ÿþ<!DOCTYPE html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" /><title>Cosmic Ray Report</title></head><body><div class="container"><h1><p class="text-dark">Cosmic Ray Report</p></h1></div><div class="container"><div class="mb-1" id="summary_info___accordion"><div class="card"><a data-toggle="collapse" data-target="#summary_info___collapse_1" aria-expanded="true" aria-controls="summary_info___collapse_1" href="#"><div class="card-header" id="summary_info___heading_1"><button class="btn btn-outline-dark"><h4 class="m-0">Summary info</h4></button></div></a><div aria-labelledby="summary_info___heading_1" data-parent="#summary_info___accordion" class="collapse show" id="summary_info___collapse_1"><div class="card-body"><p>Date time: 18/10/2025 12:25:55</p><p>Total jobs: 2537</p><p>Complete: 2537 (100.00%)</p><p>Surviving mutants: 1394 (54.95%)</p></div></div></div></div><div class="mb-1" id="job_list___accordion"><div class="card"><a data-toggle="collapse" data-target="#job_list___collapse_1" aria-expanded="false" aria-controls="job_list___collapse_1" href="#"><div class="card-header" id="job_list___heading_1"><button class="btn btn-outline-dark"><h4 class="m-0">Job list</h4></button></div></a><div aria-labelledby="job_list___heading_1" data-parent="#job_list___accordion" class="collapse" id="job_list___collapse_1"><div class="card-body"><div class="text-right mb-1"><div class="mx-1" id="job_item_expand_all"><a href="#" onclick="$('div.job_list___sub_multi_collapse').collapse('show');"><button class="btn btn-outline-dark"><span>Expand All</span></button></a></div><div class="mx-1" id="job_item_collapse_all"><a href="#" onclick="$('div.job_list___sub_multi_collapse').collapse('hide');"><button class="btn btn-outline-dark"><span>Collapse All</span></button></a></div></div><div class="mb-1" id="job_list___sub_accordion_1"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1_1"><button class="btn btn-outline-success"><span class="job_id">1 : Job ID 656d6f5099cf406f87d9e67948966e2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1_1" data-parent="#job_list___sub_accordion_1" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent + "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2_1"><button class="btn btn-outline-success"><span class="job_id">2 : Job ID ac5d199c28e84709919902b0ed18e14a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2_1" data-parent="#job_list___sub_accordion_2" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" + "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_3"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_3_1" aria-expanded="false" aria-controls="job_list___sub_collapse_3_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_3_1"><button class="btn btn-outline-success"><span class="job_id">3 : Job ID b026d611243d417f80c8fcd2e4770e5e</span></button></div></a><div aria-labelledby="job_list___sub_heading_3_1" data-parent="#job_list___sub_accordion_3" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_3_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent + "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_4"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_4_1" aria-expanded="false" aria-controls="job_list___sub_collapse_4_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_4_1"><button class="btn btn-outline-success"><span class="job_id">4 : Job ID 0f0f6e2c2c0942189523006f8e2b759d</span></button></div></a><div aria-labelledby="job_list___sub_heading_4_1" data-parent="#job_list___sub_accordion_4" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_4_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent + "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003404942872Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003405819029Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ecd0c5a5cfc2e4e74: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_5"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_5_1" aria-expanded="false" aria-controls="job_list___sub_collapse_5_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_5_1"><button class="btn btn-outline-success"><span class="job_id">5 : Job ID 22fdadcc4bd945cbabccfdd441dc65d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_5_1" data-parent="#job_list___sub_accordion_5" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_5_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" + "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ecd52b76e9ba186f9: unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_6"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_6_1" aria-expanded="false" aria-controls="job_list___sub_collapse_6_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_6_1"><button class="btn btn-outline-success"><span class="job_id">6 : Job ID 187c831f02204f96ab99cbe3d7dfa376</span></button></div></a><div aria-labelledby="job_list___sub_heading_6_1" data-parent="#job_list___sub_accordion_6" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_6_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root + "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e5a510a3e7a2a80ec: unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_7"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_7_1" aria-expanded="false" aria-controls="job_list___sub_collapse_7_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_7_1"><button class="btn btn-outline-success"><span class="job_id">7 : Job ID e867c400aaec4839bf3dad20b419c824</span></button></div></a><div aria-labelledby="job_list___sub_heading_7_1" data-parent="#job_list___sub_accordion_7" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_7_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir + dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef1ffaf14dd148e56: unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_8"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_8_1" aria-expanded="false" aria-controls="job_list___sub_collapse_8_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_8_1"><button class="btn btn-outline-success"><span class="job_id">8 : Job ID 5e0781fd5fe7496ea9bb6eb9ace4e008</span></button></div></a><div aria-labelledby="job_list___sub_heading_8_1" data-parent="#job_list___sub_accordion_8" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_8_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent - "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_9"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_9_1" aria-expanded="false" aria-controls="job_list___sub_collapse_9_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_9_1"><button class="btn btn-outline-success"><span class="job_id">9 : Job ID 7bfb38d79a0b4665875c35f3070228c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_9_1" data-parent="#job_list___sub_accordion_9" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_9_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" - "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_10"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_10_1" aria-expanded="false" aria-controls="job_list___sub_collapse_10_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_10_1"><button class="btn btn-outline-success"><span class="job_id">10 : Job ID 687b006c88714df58635d8a3b4a4184b</span></button></div></a><div aria-labelledby="job_list___sub_heading_10_1" data-parent="#job_list___sub_accordion_10" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_10_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent - "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_11"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_11_1" aria-expanded="false" aria-controls="job_list___sub_collapse_11_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_11_1"><button class="btn btn-outline-success"><span class="job_id">11 : Job ID 4279eb84352244728954a7a3e3a862ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_11_1" data-parent="#job_list___sub_accordion_11" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_11_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent - "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e88680579a11ed179: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_12"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_12_1" aria-expanded="false" aria-controls="job_list___sub_collapse_12_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_12_1"><button class="btn btn-outline-success"><span class="job_id">12 : Job ID fc18b27bfa844efcbd5d2ee710314f7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_12_1" data-parent="#job_list___sub_accordion_12" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_12_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" - "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e544aa32e3d522702: unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_13"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_13_1" aria-expanded="false" aria-controls="job_list___sub_collapse_13_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_13_1"><button class="btn btn-outline-success"><span class="job_id">13 : Job ID fe575196cdf347c7b44604b2b09c7333</span></button></div></a><div aria-labelledby="job_list___sub_heading_13_1" data-parent="#job_list___sub_accordion_13" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_13_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root - "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614edd165c4384e10926: unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_14"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_14_1" aria-expanded="false" aria-controls="job_list___sub_collapse_14_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_14_1"><button class="btn btn-outline-success"><span class="job_id">14 : Job ID ecf90a01ae974a339c132bd24195b0e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_14_1" data-parent="#job_list___sub_accordion_14" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_14_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir - dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e8f05b55853cfafec: unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_15"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_15_1" aria-expanded="false" aria-controls="job_list___sub_collapse_15_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_15_1"><button class="btn btn-outline-success"><span class="job_id">15 : Job ID adbbc0bdd9314c528bd074b86e315cc4</span></button></div></a><div aria-labelledby="job_list___sub_heading_15_1" data-parent="#job_list___sub_accordion_15" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_15_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent * "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_16"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_16_1" aria-expanded="false" aria-controls="job_list___sub_collapse_16_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_16_1"><button class="btn btn-outline-success"><span class="job_id">16 : Job ID cabe26de47774005b75d0b0bb2adb006</span></button></div></a><div aria-labelledby="job_list___sub_heading_16_1" data-parent="#job_list___sub_accordion_16" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_16_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" * "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_17"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_17_1" aria-expanded="false" aria-controls="job_list___sub_collapse_17_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_17_1"><button class="btn btn-outline-success"><span class="job_id">17 : Job ID ab6eb597fb7e4021be5942b68bab3a7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_17_1" data-parent="#job_list___sub_accordion_17" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_17_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent * "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_18"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_18_1" aria-expanded="false" aria-controls="job_list___sub_collapse_18_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_18_1"><button class="btn btn-outline-success"><span class="job_id">18 : Job ID c670fe95d6554580b8122a2e13da7ca0</span></button></div></a><div aria-labelledby="job_list___sub_heading_18_1" data-parent="#job_list___sub_accordion_18" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_18_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent * "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T130530131446Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T130531022096Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e792f6e3055462b45: can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_19"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_19_1" aria-expanded="false" aria-controls="job_list___sub_collapse_19_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_19_1"><button class="btn btn-outline-success"><span class="job_id">19 : Job ID 80aa8d1f3bba47b0b13b7a3bbfa92b9b</span></button></div></a><div aria-labelledby="job_list___sub_heading_19_1" data-parent="#job_list___sub_accordion_19" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_19_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" * "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee01ad4215e7bb69b: can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_20"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_20_1" aria-expanded="false" aria-controls="job_list___sub_collapse_20_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_20_1"><button class="btn btn-outline-success"><span class="job_id">20 : Job ID 9e5d852e40374fce8c01650a02b77f1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_20_1" data-parent="#job_list___sub_accordion_20" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_20_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root * "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e288bfe8cd445933c: can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_21"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_21_1" aria-expanded="false" aria-controls="job_list___sub_collapse_21_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_21_1"><button class="btn btn-outline-success"><span class="job_id">21 : Job ID 9720481f3d4f458cb7dcdbf0e4948c90</span></button></div></a><div aria-labelledby="job_list___sub_heading_21_1" data-parent="#job_list___sub_accordion_21" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_21_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir * dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec6871a83d1f0fd71: can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_22"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_22_1" aria-expanded="false" aria-controls="job_list___sub_collapse_22_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_22_1"><button class="btn btn-outline-success"><span class="job_id">22 : Job ID a1c4d4e791ec4c92aa1533ef6285f0be</span></button></div></a><div aria-labelledby="job_list___sub_heading_22_1" data-parent="#job_list___sub_accordion_22" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_22_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent // "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_23"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_23_1" aria-expanded="false" aria-controls="job_list___sub_collapse_23_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_23_1"><button class="btn btn-outline-success"><span class="job_id">23 : Job ID 803e7a66125345b28c8a5a5097e55f47</span></button></div></a><div aria-labelledby="job_list___sub_heading_23_1" data-parent="#job_list___sub_accordion_23" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_23_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" // "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_24"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_24_1" aria-expanded="false" aria-controls="job_list___sub_collapse_24_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_24_1"><button class="btn btn-outline-success"><span class="job_id">24 : Job ID 7b8d8a16e05c452588855dae04624f9f</span></button></div></a><div aria-labelledby="job_list___sub_heading_24_1" data-parent="#job_list___sub_accordion_24" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_24_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent // "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_25"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_25_1" aria-expanded="false" aria-controls="job_list___sub_collapse_25_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_25_1"><button class="btn btn-outline-success"><span class="job_id">25 : Job ID f00679140092471a863513612fb74db3</span></button></div></a><div aria-labelledby="job_list___sub_heading_25_1" data-parent="#job_list___sub_accordion_25" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_25_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent // "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ea1d69af5fc7401a4: unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_26"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_26_1" aria-expanded="false" aria-controls="job_list___sub_collapse_26_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_26_1"><button class="btn btn-outline-success"><span class="job_id">26 : Job ID e4425bb48f0b4989ab02f0146b98c2bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_26_1" data-parent="#job_list___sub_accordion_26" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_26_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" // "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e4a45087bf92ffdb7: unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_27"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_27_1" aria-expanded="false" aria-controls="job_list___sub_collapse_27_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_27_1"><button class="btn btn-outline-success"><span class="job_id">27 : Job ID 42619c62a1c34918986bfe857c2b7121</span></button></div></a><div aria-labelledby="job_list___sub_heading_27_1" data-parent="#job_list___sub_accordion_27" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_27_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root // "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T112023995777Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T112024872348Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e134522e11cb1c446: unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_28"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_28_1" aria-expanded="false" aria-controls="job_list___sub_collapse_28_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_28_1"><button class="btn btn-outline-success"><span class="job_id">28 : Job ID f437e995d191434fb00a93e582d355b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_28_1" data-parent="#job_list___sub_accordion_28" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_28_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir // dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e4a729991f8f7f8a6: unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_29"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_29_1" aria-expanded="false" aria-controls="job_list___sub_collapse_29_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_29_1"><button class="btn btn-outline-success"><span class="job_id">29 : Job ID 72b96bc2bb4145e49bc69f46e952d4ed</span></button></div></a><div aria-labelledby="job_list___sub_heading_29_1" data-parent="#job_list___sub_accordion_29" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_29_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent % "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_30"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_30_1" aria-expanded="false" aria-controls="job_list___sub_collapse_30_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_30_1"><button class="btn btn-outline-success"><span class="job_id">30 : Job ID d65c2ac5567e4e0281ba50d1bab7d915</span></button></div></a><div aria-labelledby="job_list___sub_heading_30_1" data-parent="#job_list___sub_accordion_30" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_30_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" % "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_31"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_31_1" aria-expanded="false" aria-controls="job_list___sub_collapse_31_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_31_1"><button class="btn btn-outline-success"><span class="job_id">31 : Job ID 263e032267d84c2997911f43bf6ac9e6</span></button></div></a><div aria-labelledby="job_list___sub_heading_31_1" data-parent="#job_list___sub_accordion_31" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_31_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent % "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_32"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_32_1" aria-expanded="false" aria-controls="job_list___sub_collapse_32_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_32_1"><button class="btn btn-outline-success"><span class="job_id">32 : Job ID 3e9b13b3b779407d92ebdbeabc896ead</span></button></div></a><div aria-labelledby="job_list___sub_heading_32_1" data-parent="#job_list___sub_accordion_32" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_32_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent % "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e5057d7ab6a0fce85: unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_33"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_33_1" aria-expanded="false" aria-controls="job_list___sub_collapse_33_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_33_1"><button class="btn btn-outline-success"><span class="job_id">33 : Job ID 75a8f107313c492b86431c49dbf00241</span></button></div></a><div aria-labelledby="job_list___sub_heading_33_1" data-parent="#job_list___sub_accordion_33" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_33_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" % "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e9ff01e656e7e0cf4: unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_34"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_34_1" aria-expanded="false" aria-controls="job_list___sub_collapse_34_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_34_1"><button class="btn btn-outline-success"><span class="job_id">34 : Job ID 6a51aebcd91641d0ba0240e211d8ff17</span></button></div></a><div aria-labelledby="job_list___sub_heading_34_1" data-parent="#job_list___sub_accordion_34" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_34_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root % "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e3e43afe50fefc611: unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_35"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_35_1" aria-expanded="false" aria-controls="job_list___sub_collapse_35_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_35_1"><button class="btn btn-outline-success"><span class="job_id">35 : Job ID d2b9933c413f4b78ba5226b98e8bf8af</span></button></div></a><div aria-labelledby="job_list___sub_heading_35_1" data-parent="#job_list___sub_accordion_35" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_35_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir % dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614edc9cc6da63827304: unsupported operand type(s) for %: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_36"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_36_1" aria-expanded="false" aria-controls="job_list___sub_collapse_36_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_36_1"><button class="btn btn-outline-success"><span class="job_id">36 : Job ID a6ebd468c28749be8068ca78ea261770</span></button></div></a><div aria-labelledby="job_list___sub_heading_36_1" data-parent="#job_list___sub_accordion_36" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_36_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent ** "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_37"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_37_1" aria-expanded="false" aria-controls="job_list___sub_collapse_37_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_37_1"><button class="btn btn-outline-success"><span class="job_id">37 : Job ID 08e665246d574b548919f13c50be3d89</span></button></div></a><div aria-labelledby="job_list___sub_heading_37_1" data-parent="#job_list___sub_accordion_37" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_37_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" ** "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_38"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_38_1" aria-expanded="false" aria-controls="job_list___sub_collapse_38_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_38_1"><button class="btn btn-outline-success"><span class="job_id">38 : Job ID 41b147df09f94b00a48d86ffa9e44dbc</span></button></div></a><div aria-labelledby="job_list___sub_heading_38_1" data-parent="#job_list___sub_accordion_38" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_38_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent ** "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_39"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_39_1" aria-expanded="false" aria-controls="job_list___sub_collapse_39_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_39_1"><button class="btn btn-outline-success"><span class="job_id">39 : Job ID e710d47a3b4f483a9f015668f79ebc26</span></button></div></a><div aria-labelledby="job_list___sub_heading_39_1" data-parent="#job_list___sub_accordion_39" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_39_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent ** "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e8d43c1366a0ba6a8: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_40"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_40_1" aria-expanded="false" aria-controls="job_list___sub_collapse_40_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_40_1"><button class="btn btn-outline-success"><span class="job_id">40 : Job ID 97c9ee7262c147789fed4ec4fa9c8c75</span></button></div></a><div aria-labelledby="job_list___sub_heading_40_1" data-parent="#job_list___sub_accordion_40" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_40_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" ** "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e852b2b1da3aa6216: unsupported operand type(s) for ** or pow(): 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_41"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_41_1" aria-expanded="false" aria-controls="job_list___sub_collapse_41_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_41_1"><button class="btn btn-outline-success"><span class="job_id">41 : Job ID c5193ea7f36e4d6ba7a8323fc2adb263</span></button></div></a><div aria-labelledby="job_list___sub_heading_41_1" data-parent="#job_list___sub_accordion_41" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_41_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root ** "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182829930995Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182830813819Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e2f8fcb3745542c5a: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_42"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_42_1" aria-expanded="false" aria-controls="job_list___sub_collapse_42_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_42_1"><button class="btn btn-outline-success"><span class="job_id">42 : Job ID a6308929f04a4d85a5f35c053ab8eceb</span></button></div></a><div aria-labelledby="job_list___sub_heading_42_1" data-parent="#job_list___sub_accordion_42" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_42_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir ** dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6c562bb4965f9ad6: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_43"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_43_1" aria-expanded="false" aria-controls="job_list___sub_collapse_43_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_43_1"><button class="btn btn-outline-success"><span class="job_id">43 : Job ID a09da04fdddf4c9cafb18b50d96fe0f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_43_1" data-parent="#job_list___sub_accordion_43" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_43_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent &gt;&gt; "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_44"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_44_1" aria-expanded="false" aria-controls="job_list___sub_collapse_44_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_44_1"><button class="btn btn-outline-success"><span class="job_id">44 : Job ID fa6916126b164af3bc843f48cab8d76c</span></button></div></a><div aria-labelledby="job_list___sub_heading_44_1" data-parent="#job_list___sub_accordion_44" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_44_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" &gt;&gt; "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000304241834Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000304412243Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 15.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_45"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_45_1" aria-expanded="false" aria-controls="job_list___sub_collapse_45_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_45_1"><button class="btn btn-outline-success"><span class="job_id">45 : Job ID 8766502479f84189bf309a828d0fed38</span></button></div></a><div aria-labelledby="job_list___sub_heading_45_1" data-parent="#job_list___sub_accordion_45" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_45_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &gt;&gt; "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_46"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_46_1" aria-expanded="false" aria-controls="job_list___sub_collapse_46_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_46_1"><button class="btn btn-outline-success"><span class="job_id">46 : Job ID 05900cb7af174431bdfd0d3c5ed0fb57</span></button></div></a><div aria-labelledby="job_list___sub_heading_46_1" data-parent="#job_list___sub_accordion_46" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_46_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent &gt;&gt; "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e0cddb52140f31a2e: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_47"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_47_1" aria-expanded="false" aria-controls="job_list___sub_collapse_47_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_47_1"><button class="btn btn-outline-success"><span class="job_id">47 : Job ID 2ee3eb19d6a94084bddb275ee9c9e708</span></button></div></a><div aria-labelledby="job_list___sub_heading_47_1" data-parent="#job_list___sub_accordion_47" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_47_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" &gt;&gt; "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec62443ae862ff211: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_48"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_48_1" aria-expanded="false" aria-controls="job_list___sub_collapse_48_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_48_1"><button class="btn btn-outline-success"><span class="job_id">48 : Job ID 8e1832780ea44429b937e02a76a5ba14</span></button></div></a><div aria-labelledby="job_list___sub_heading_48_1" data-parent="#job_list___sub_accordion_48" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_48_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root &gt;&gt; "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ebd2407068c603cd6: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_49"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_49_1" aria-expanded="false" aria-controls="job_list___sub_collapse_49_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_49_1"><button class="btn btn-outline-success"><span class="job_id">49 : Job ID 39569cd55f0a48748c7d29d687442a80</span></button></div></a><div aria-labelledby="job_list___sub_heading_49_1" data-parent="#job_list___sub_accordion_49" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_49_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir &gt;&gt; dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T121715372470Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T121716255387Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_50"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_50_1" aria-expanded="false" aria-controls="job_list___sub_collapse_50_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_50_1"><button class="btn btn-outline-success"><span class="job_id">50 : Job ID 1b301386c98d48b9a5a01b7b5d7b8f0b</span></button></div></a><div aria-labelledby="job_list___sub_heading_50_1" data-parent="#job_list___sub_accordion_50" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_50_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent &lt;&lt; "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_51"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_51_1" aria-expanded="false" aria-controls="job_list___sub_collapse_51_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_51_1"><button class="btn btn-outline-success"><span class="job_id">51 : Job ID 0af239934fc14fdabc04d45055172aae</span></button></div></a><div aria-labelledby="job_list___sub_heading_51_1" data-parent="#job_list___sub_accordion_51" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_51_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" &lt;&lt; "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_52"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_52_1" aria-expanded="false" aria-controls="job_list___sub_collapse_52_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_52_1"><button class="btn btn-outline-success"><span class="job_id">52 : Job ID d0d4b0cb9845453381464b90b82fe90f</span></button></div></a><div aria-labelledby="job_list___sub_heading_52_1" data-parent="#job_list___sub_accordion_52" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_52_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &lt;&lt; "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_53"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_53_1" aria-expanded="false" aria-controls="job_list___sub_collapse_53_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_53_1"><button class="btn btn-outline-success"><span class="job_id">53 : Job ID 8c2e073186494611bc052f2e68d046c3</span></button></div></a><div aria-labelledby="job_list___sub_heading_53_1" data-parent="#job_list___sub_accordion_53" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_53_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent &lt;&lt; "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb17ce4072a243e0d: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_54"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_54_1" aria-expanded="false" aria-controls="job_list___sub_collapse_54_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_54_1"><button class="btn btn-outline-success"><span class="job_id">54 : Job ID 3a4670c8ac9d41b39687f9fdf9aa43ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_54_1" data-parent="#job_list___sub_accordion_54" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_54_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" &lt;&lt; "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee9f7713b0bc4a5ca: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_55"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_55_1" aria-expanded="false" aria-controls="job_list___sub_collapse_55_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_55_1"><button class="btn btn-outline-success"><span class="job_id">55 : Job ID e204528617504682a8ac6d9cb06d402a</span></button></div></a><div aria-labelledby="job_list___sub_heading_55_1" data-parent="#job_list___sub_accordion_55" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_55_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root &lt;&lt; "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ea560270e32d1cfb1: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_56"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_56_1" aria-expanded="false" aria-controls="job_list___sub_collapse_56_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_56_1"><button class="btn btn-outline-success"><span class="job_id">56 : Job ID a0f668b2376045779bb5bcae7d105d74</span></button></div></a><div aria-labelledby="job_list___sub_heading_56_1" data-parent="#job_list___sub_accordion_56" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_56_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir &lt;&lt; dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e91c7c170ec78fda1: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_57"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_57_1" aria-expanded="false" aria-controls="job_list___sub_collapse_57_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_57_1"><button class="btn btn-outline-success"><span class="job_id">57 : Job ID 93a08005866d489087b949a54b576a0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_57_1" data-parent="#job_list___sub_accordion_57" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_57_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent | "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_58"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_58_1" aria-expanded="false" aria-controls="job_list___sub_collapse_58_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_58_1"><button class="btn btn-outline-success"><span class="job_id">58 : Job ID be09b0ecb231415ba7fdd76bd14d6cab</span></button></div></a><div aria-labelledby="job_list___sub_heading_58_1" data-parent="#job_list___sub_accordion_58" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_58_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" | "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_59"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_59_1" aria-expanded="false" aria-controls="job_list___sub_collapse_59_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_59_1"><button class="btn btn-outline-success"><span class="job_id">59 : Job ID e118ab1d096d434c93cc0ce817b89e04</span></button></div></a><div aria-labelledby="job_list___sub_heading_59_1" data-parent="#job_list___sub_accordion_59" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_59_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent | "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_60"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_60_1" aria-expanded="false" aria-controls="job_list___sub_collapse_60_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_60_1"><button class="btn btn-outline-success"><span class="job_id">60 : Job ID 492950fee6b04f6b8eea12721d7aa9ad</span></button></div></a><div aria-labelledby="job_list___sub_heading_60_1" data-parent="#job_list___sub_accordion_60" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_60_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent | "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb9739a24d73ab147: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_61"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_61_1" aria-expanded="false" aria-controls="job_list___sub_collapse_61_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_61_1"><button class="btn btn-outline-success"><span class="job_id">61 : Job ID b8d38312075242428a5e5856822d301a</span></button></div></a><div aria-labelledby="job_list___sub_heading_61_1" data-parent="#job_list___sub_accordion_61" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_61_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" | "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee5cac79ee1e9b01b: unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_62"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_62_1" aria-expanded="false" aria-controls="job_list___sub_collapse_62_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_62_1"><button class="btn btn-outline-success"><span class="job_id">62 : Job ID 4882d83f45b44f16b56d4d42d4dda639</span></button></div></a><div aria-labelledby="job_list___sub_heading_62_1" data-parent="#job_list___sub_accordion_62" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_62_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root | "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e0a542a326e0fe0d6: unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_63"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_63_1" aria-expanded="false" aria-controls="job_list___sub_collapse_63_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_63_1"><button class="btn btn-outline-success"><span class="job_id">63 : Job ID 35c912988fb2441cbce8f082694487b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_63_1" data-parent="#job_list___sub_accordion_63" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_63_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir | dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220156171662Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220157096191Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e332fb07f13bb1d06: unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_64"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_64_1" aria-expanded="false" aria-controls="job_list___sub_collapse_64_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_64_1"><button class="btn btn-outline-success"><span class="job_id">64 : Job ID 2b14fbf5c7b24e47bbffd3ec9e09f0a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_64_1" data-parent="#job_list___sub_accordion_64" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_64_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent &amp; "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_65"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_65_1" aria-expanded="false" aria-controls="job_list___sub_collapse_65_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_65_1"><button class="btn btn-outline-success"><span class="job_id">65 : Job ID e5260a231c5d4d9e9955cb25b62cc301</span></button></div></a><div aria-labelledby="job_list___sub_heading_65_1" data-parent="#job_list___sub_accordion_65" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_65_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" &amp; "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_66"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_66_1" aria-expanded="false" aria-controls="job_list___sub_collapse_66_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_66_1"><button class="btn btn-outline-success"><span class="job_id">66 : Job ID 0639389e627a4dc29384d10166cb07f9</span></button></div></a><div aria-labelledby="job_list___sub_heading_66_1" data-parent="#job_list___sub_accordion_66" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_66_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &amp; "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_67"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_67_1" aria-expanded="false" aria-controls="job_list___sub_collapse_67_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_67_1"><button class="btn btn-outline-success"><span class="job_id">67 : Job ID f11ae205fd8240e18d75b94610630872</span></button></div></a><div aria-labelledby="job_list___sub_heading_67_1" data-parent="#job_list___sub_accordion_67" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_67_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent &amp; "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e4b2ee2dd62b9bc5f: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_68"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_68_1" aria-expanded="false" aria-controls="job_list___sub_collapse_68_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_68_1"><button class="btn btn-outline-success"><span class="job_id">68 : Job ID cd62b3461b9e404e99850805f6a2fae6</span></button></div></a><div aria-labelledby="job_list___sub_heading_68_1" data-parent="#job_list___sub_accordion_68" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_68_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" &amp; "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e18f97bcd5da6fb3e: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_69"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_69_1" aria-expanded="false" aria-controls="job_list___sub_collapse_69_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_69_1"><button class="btn btn-outline-success"><span class="job_id">69 : Job ID 4f8e4c9534294f1c8a8dddfea2296bb6</span></button></div></a><div aria-labelledby="job_list___sub_heading_69_1" data-parent="#job_list___sub_accordion_69" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_69_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root &amp; "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e832040cf84fcd8d8: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_70"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_70_1" aria-expanded="false" aria-controls="job_list___sub_collapse_70_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_70_1"><button class="btn btn-outline-success"><span class="job_id">70 : Job ID 36ed8a543d8b44828cd474e3dc9231d6</span></button></div></a><div aria-labelledby="job_list___sub_heading_70_1" data-parent="#job_list___sub_accordion_70" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_70_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir &amp; dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e203ed12e67037b80: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_71"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_71_1" aria-expanded="false" aria-controls="job_list___sub_collapse_71_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_71_1"><button class="btn btn-outline-success"><span class="job_id">71 : Job ID 9ba7c2927eb94998a3f17e56ac213e04</span></button></div></a><div aria-labelledby="job_list___sub_heading_71_1" data-parent="#job_list___sub_accordion_71" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_71_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 59), end pos: (48, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent ^ "public-keys" / "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for /: 'str' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_72"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_72_1" aria-expanded="false" aria-controls="job_list___sub_collapse_72_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_72_1"><button class="btn btn-outline-success"><span class="job_id">72 : Job ID f963f81b658347428e37e5f401734fa0</span></button></div></a><div aria-labelledby="job_list___sub_heading_72_1" data-parent="#job_list___sub_accordion_72" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_72_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (48, 75), end pos: (48, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -45,7 +45,7 @@ def _initialize_rmap(self) -&gt; SimpleRMAP: """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys - public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") + public_keys_dir = str(Path(__file__).parent.parent / "public-keys" ^ "pki") server_private_key = str(Path(__file__).parent / "server_priv.asc") return SimpleRMAP(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_73"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_73_1" aria-expanded="false" aria-controls="job_list___sub_collapse_73_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_73_1"><button class="btn btn-outline-success"><span class="job_id">73 : Job ID 14f8ac2c33674447a63b293005e49f51</span></button></div></a><div aria-labelledby="job_list___sub_heading_73_1" data-parent="#job_list___sub_accordion_73" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_73_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (49, 55), end pos: (49, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -46,7 +46,7 @@ """Initialize the RMAP instance with proper key paths.""" # Set up paths for keys public_keys_dir = str(Path(__file__).parent.parent / "public-keys" / "pki") - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent ^ "server_priv.asc") return SimpleRMAP( self.storage_dir,</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_74"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_74_1" aria-expanded="false" aria-controls="job_list___sub_collapse_74_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_74_1"><button class="btn btn-outline-success"><span class="job_id">74 : Job ID 061a25b33a5244888d112e604cfca05a</span></button></div></a><div aria-labelledby="job_list___sub_heading_74_1" data-parent="#job_list___sub_accordion_74" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_74_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 46), end pos: (163, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent ^ "static" / "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec8e1bf5dcffc73f4: unsupported operand type(s) for /: 'str' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_75"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_75_1" aria-expanded="false" aria-controls="job_list___sub_collapse_75_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_75_1"><button class="btn btn-outline-success"><span class="job_id">75 : Job ID f978dee910c7409eab5e5eca8735faae</span></button></div></a><div aria-labelledby="job_list___sub_heading_75_1" data-parent="#job_list___sub_accordion_75" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_75_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (163, 57), end pos: (163, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -160,7 +160,7 @@ # Resolve file path storage_root = Path(self.storage_dir).resolve() # Always use static/Group_13.pdf for watermarking - file_path = Path(__file__).parent / "static" / "Group_13.pdf" + file_path = Path(__file__).parent / "static" ^ "Group_13.pdf" file_path = file_path.resolve() if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef3c03c3194bf5751: unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_76"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_76_1" aria-expanded="false" aria-controls="job_list___sub_collapse_76_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_76_1"><button class="btn btn-outline-success"><span class="job_id">76 : Job ID e23b9da5b46643b1b632b7bf2f631356</span></button></div></a><div aria-labelledby="job_list___sub_heading_76_1" data-parent="#job_list___sub_accordion_76" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_76_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (273, 36), end pos: (273, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -270,7 +270,7 @@ return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file - rmap_dir = storage_root / "rmap_watermarks" + rmap_dir = storage_root ^ "rmap_watermarks" rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e9790a3df63dc940f: unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_77"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_77_1" aria-expanded="false" aria-controls="job_list___sub_collapse_77_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_77_1"><button class="btn btn-outline-success"><span class="job_id">77 : Job ID e4ed4c149cc142dc8016ce10f892f5e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_77_1" data-parent="#job_list___sub_accordion_77" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_77_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (277, 33), end pos: (277, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -274,7 +274,7 @@ rmap_dir.mkdir(parents=True, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" - dest_path = rmap_dir / dest_filename + dest_path = rmap_dir ^ dest_filename # Write watermarked PDF with dest_path.open("wb") as f:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ed52633584c26f0c9: unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_78"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_78_1" aria-expanded="false" aria-controls="job_list___sub_collapse_78_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_78_1"><button class="btn btn-outline-success"><span class="job_id">78 : Job ID e2d0a3a25a314ecba9a9e9b09e6b6352</span></button></div></a><div aria-labelledby="job_list___sub_heading_78_1" data-parent="#job_list___sub_accordion_78" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_78_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any + None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 16.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_79"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_79_1" aria-expanded="false" aria-controls="job_list___sub_collapse_79_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_79_1"><button class="btn btn-outline-success"><span class="job_id">79 : Job ID 883d3b7e4894423faa0d405ec8c3d467</span></button></div></a><div aria-labelledby="job_list___sub_heading_79_1" data-parent="#job_list___sub_accordion_79" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_79_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes + bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee8a25cf46791eaf9: unsupported operand type(s) for +: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_80"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_80_1" aria-expanded="false" aria-controls="job_list___sub_collapse_80_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_80_1"><button class="btn btn-outline-success"><span class="job_id">80 : Job ID 270206cdff59405cb6218430483502cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_80_1" data-parent="#job_list___sub_accordion_80" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_80_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any - None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_81"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_81_1" aria-expanded="false" aria-controls="job_list___sub_collapse_81_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_81_1"><button class="btn btn-outline-success"><span class="job_id">81 : Job ID 9a652051470a45f09a0944223d49a212</span></button></div></a><div aria-labelledby="job_list___sub_heading_81_1" data-parent="#job_list___sub_accordion_81" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_81_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes - bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e42932b3bccd79f37: unsupported operand type(s) for -: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_82"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_82_1" aria-expanded="false" aria-controls="job_list___sub_collapse_82_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_82_1"><button class="btn btn-outline-success"><span class="job_id">82 : Job ID aea43c4199484a11bcdc05619b45239c</span></button></div></a><div aria-labelledby="job_list___sub_heading_82_1" data-parent="#job_list___sub_accordion_82" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_82_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any * None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 16.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_83"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_83_1" aria-expanded="false" aria-controls="job_list___sub_collapse_83_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_83_1"><button class="btn btn-outline-success"><span class="job_id">83 : Job ID a517a93b1bc14128af35a40ed3a0bb46</span></button></div></a><div aria-labelledby="job_list___sub_heading_83_1" data-parent="#job_list___sub_accordion_83" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_83_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes * bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee7cdad9480df0014: unsupported operand type(s) for *: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_84"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_84_1" aria-expanded="false" aria-controls="job_list___sub_collapse_84_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_84_1"><button class="btn btn-outline-success"><span class="job_id">84 : Job ID cc3482d1e22d413fbc4418ef768cd359</span></button></div></a><div aria-labelledby="job_list___sub_heading_84_1" data-parent="#job_list___sub_accordion_84" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_84_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any / None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_85"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_85_1" aria-expanded="false" aria-controls="job_list___sub_collapse_85_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_85_1"><button class="btn btn-outline-success"><span class="job_id">85 : Job ID 514ed913614445d2a984446192095ef2</span></button></div></a><div aria-labelledby="job_list___sub_heading_85_1" data-parent="#job_list___sub_accordion_85" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_85_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes / bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ea45f3511f69fade0: unsupported operand type(s) for /: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_86"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_86_1" aria-expanded="false" aria-controls="job_list___sub_collapse_86_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_86_1"><button class="btn btn-outline-success"><span class="job_id">86 : Job ID 087acbc48b5048c191a1a4d2819ff528</span></button></div></a><div aria-labelledby="job_list___sub_heading_86_1" data-parent="#job_list___sub_accordion_86" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_86_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any // None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 16.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_87"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_87_1" aria-expanded="false" aria-controls="job_list___sub_collapse_87_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_87_1"><button class="btn btn-outline-success"><span class="job_id">87 : Job ID ce0f00f345ae4a45a548da8f248c3488</span></button></div></a><div aria-labelledby="job_list___sub_heading_87_1" data-parent="#job_list___sub_accordion_87" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_87_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes // bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec0819e7d5bfedecc: unsupported operand type(s) for //: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_88"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_88_1" aria-expanded="false" aria-controls="job_list___sub_collapse_88_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_88_1"><button class="btn btn-outline-success"><span class="job_id">88 : Job ID 0afc2c1f28e74cd19ff91dcbf77de255</span></button></div></a><div aria-labelledby="job_list___sub_heading_88_1" data-parent="#job_list___sub_accordion_88" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_88_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any % None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_89"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_89_1" aria-expanded="false" aria-controls="job_list___sub_collapse_89_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_89_1"><button class="btn btn-outline-success"><span class="job_id">89 : Job ID 872679941fc74d37801af6fddf80ba6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_89_1" data-parent="#job_list___sub_accordion_89" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_89_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes % bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e0107597a4a806524: unsupported operand type(s) for %: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_90"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_90_1" aria-expanded="false" aria-controls="job_list___sub_collapse_90_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_90_1"><button class="btn btn-outline-success"><span class="job_id">90 : Job ID 90396bf056654d49a62c6b72f0fc63c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_90_1" data-parent="#job_list___sub_accordion_90" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_90_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any ** None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131520362257Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131520681095Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 15.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_91"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_91_1" aria-expanded="false" aria-controls="job_list___sub_collapse_91_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_91_1"><button class="btn btn-outline-success"><span class="job_id">91 : Job ID 5ad487f1afad47ba8aa771f1dfb822ad</span></button></div></a><div aria-labelledby="job_list___sub_heading_91_1" data-parent="#job_list___sub_accordion_91" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_91_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes ** bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e735b064b0219877f: unsupported operand type(s) for ** or pow(): 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_92"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_92_1" aria-expanded="false" aria-controls="job_list___sub_collapse_92_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_92_1"><button class="btn btn-outline-success"><span class="job_id">92 : Job ID 6ee59b88cda04507b86ef4d2ee6a3379</span></button></div></a><div aria-labelledby="job_list___sub_heading_92_1" data-parent="#job_list___sub_accordion_92" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_92_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any &gt;&gt; None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_93"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_93_1" aria-expanded="false" aria-controls="job_list___sub_collapse_93_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_93_1"><button class="btn btn-outline-success"><span class="job_id">93 : Job ID 1e4b0a4e04664b9592da63208714533d</span></button></div></a><div aria-labelledby="job_list___sub_heading_93_1" data-parent="#job_list___sub_accordion_93" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_93_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes &gt;&gt; bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec481906fe55e9e57: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_94"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_94_1" aria-expanded="false" aria-controls="job_list___sub_collapse_94_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_94_1"><button class="btn btn-outline-success"><span class="job_id">94 : Job ID aefe4322e932464a9dc092cdde8eb385</span></button></div></a><div aria-labelledby="job_list___sub_heading_94_1" data-parent="#job_list___sub_accordion_94" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_94_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any &lt;&lt; None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125717511912Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125717732013Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 14.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_95"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_95_1" aria-expanded="false" aria-controls="job_list___sub_collapse_95_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_95_1"><button class="btn btn-outline-success"><span class="job_id">95 : Job ID 7545d83cd32146bc97414e7d515a5ffe</span></button></div></a><div aria-labelledby="job_list___sub_heading_95_1" data-parent="#job_list___sub_accordion_95" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_95_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes &lt;&lt; bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150527019035Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150527931419Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ed1e93184f72f4aea: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_96"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_96_1" aria-expanded="false" aria-controls="job_list___sub_collapse_96_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_96_1"><button class="btn btn-outline-success"><span class="job_id">96 : Job ID ee4f455fb6df4adca61f878ba2db87a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_96_1" data-parent="#job_list___sub_accordion_96" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_96_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any &amp; None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190840942718Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190841278028Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 14.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_97"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_97_1" aria-expanded="false" aria-controls="job_list___sub_collapse_97_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_97_1"><button class="btn btn-outline-success"><span class="job_id">97 : Job ID 64643000f54c4d96959d1ef69b62f81d</span></button></div></a><div aria-labelledby="job_list___sub_heading_97_1" data-parent="#job_list___sub_accordion_97" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_97_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes &amp; bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ea663648c72fffe81: unsupported operand type(s) for &amp;: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_98"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_98_1" aria-expanded="false" aria-controls="job_list___sub_collapse_98_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_98_1"><button class="btn btn-outline-success"><span class="job_id">98 : Job ID 872ba870ff96473c8bd62d5aa0b76e4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_98_1" data-parent="#job_list___sub_accordion_98" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_98_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (112, 78), end pos: (112, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -109,7 +109,7 @@ except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 - def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: + def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any ^ None: """ Create a watermarked PDF for the RMAP session. </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_99"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_99_1" aria-expanded="false" aria-controls="job_list___sub_collapse_99_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_99_1"><button class="btn btn-outline-success"><span class="job_id">99 : Job ID a854378a615744ae9bc6b4ac0cc53265</span></button></div></a><div aria-labelledby="job_list___sub_heading_99_1" data-parent="#job_list___sub_accordion_99" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_99_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 46), end pos: (269, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes ^ bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb3e2c3addb6436c4: unsupported operand type(s) for ^: 'type' and 'type' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_100"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_100_1" aria-expanded="false" aria-controls="job_list___sub_collapse_100_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_100_1"><button class="btn btn-outline-success"><span class="job_id">100 : Job ID 98d89f39563b411080c44057b8d4acd0</span></button></div></a><div aria-labelledby="job_list___sub_heading_100_1" data-parent="#job_list___sub_accordion_100" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_100_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 76), end pos: (269, 78)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) != 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_101"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_101_1" aria-expanded="false" aria-controls="job_list___sub_collapse_101_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_101_1"><button class="btn btn-outline-success"><span class="job_id">101 : Job ID 2662e01b35324c83b0d0b41d7b9f94d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_101_1" data-parent="#job_list___sub_accordion_101" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_101_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for != "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123846082818Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123846955293Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_102"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_102_1" aria-expanded="false" aria-controls="job_list___sub_collapse_102_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_102_1"><button class="btn btn-outline-danger"><span class="job_id">102 : Job ID 80606b1c25044e7f9b81fe017b84aafb</span></button></div></a><div aria-labelledby="job_list___sub_heading_102_1" data-parent="#job_list___sub_accordion_102" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_102_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 76), end pos: (269, 78)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) &lt; 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_103"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_103_1" aria-expanded="false" aria-controls="job_list___sub_collapse_103_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_103_1"><button class="btn btn-outline-danger"><span class="job_id">103 : Job ID 95761d364dae4bae9cce9d6a18f4aac8</span></button></div></a><div aria-labelledby="job_list___sub_heading_103_1" data-parent="#job_list___sub_accordion_103" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_103_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for &lt; "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_104"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_104_1" aria-expanded="false" aria-controls="job_list___sub_collapse_104_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_104_1"><button class="btn btn-outline-danger"><span class="job_id">104 : Job ID e403aebea9ed419ba1e4664dc1576c17</span></button></div></a><div aria-labelledby="job_list___sub_heading_104_1" data-parent="#job_list___sub_accordion_104" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_104_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 76), end pos: (269, 78)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) &lt;= 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_105"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_105_1" aria-expanded="false" aria-controls="job_list___sub_collapse_105_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_105_1"><button class="btn btn-outline-danger"><span class="job_id">105 : Job ID cca6691a2e8d472e926812a838c55dbf</span></button></div></a><div aria-labelledby="job_list___sub_heading_105_1" data-parent="#job_list___sub_accordion_105" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_105_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for &lt;= "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_106"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_106_1" aria-expanded="false" aria-controls="job_list___sub_collapse_106_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_106_1"><button class="btn btn-outline-success"><span class="job_id">106 : Job ID 1363a34a49994ad2b325fe40c31dcc6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_106_1" data-parent="#job_list___sub_accordion_106" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_106_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 76), end pos: (269, 78)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) &gt; 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_107"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_107_1" aria-expanded="false" aria-controls="job_list___sub_collapse_107_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_107_1"><button class="btn btn-outline-danger"><span class="job_id">107 : Job ID b2424c1ca0414010a8ced2f33137e58e</span></button></div></a><div aria-labelledby="job_list___sub_heading_107_1" data-parent="#job_list___sub_accordion_107" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_107_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for &gt; "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_108"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_108_1" aria-expanded="false" aria-controls="job_list___sub_collapse_108_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_108_1"><button class="btn btn-outline-success"><span class="job_id">108 : Job ID 48d4bdd997e640899185ff8373ba0325</span></button></div></a><div aria-labelledby="job_list___sub_heading_108_1" data-parent="#job_list___sub_accordion_108" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_108_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 76), end pos: (269, 78)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) &gt;= 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_109"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_109_1" aria-expanded="false" aria-controls="job_list___sub_collapse_109_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_109_1"><button class="btn btn-outline-danger"><span class="job_id">109 : Job ID 39740256a0584a939f8fa163866cb26b</span></button></div></a><div aria-labelledby="job_list___sub_heading_109_1" data-parent="#job_list___sub_accordion_109" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_109_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for &gt;= "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_110"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_110_1" aria-expanded="false" aria-controls="job_list___sub_collapse_110_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_110_1"><button class="btn btn-outline-danger"><span class="job_id">110 : Job ID 42b00661667a41c2a357a9c61de38643</span></button></div></a><div aria-labelledby="job_list___sub_heading_110_1" data-parent="#job_list___sub_accordion_110" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_110_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for is "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( rmap_handler.py:290 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\rmap_handler.py:290: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? if intended_for is None or intended_for is "Unknown_Group": ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_111"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_111_1" aria-expanded="false" aria-controls="job_list___sub_collapse_111_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_111_1"><button class="btn btn-outline-danger"><span class="job_id">111 : Job ID b8a8c522f997459497be76337da75e66</span></button></div></a><div aria-labelledby="job_list___sub_heading_111_1" data-parent="#job_list___sub_accordion_111" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_111_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 60), end pos: (290, 62)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None or intended_for is not "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( rmap_handler.py:290 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\rmap_handler.py:290: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="? if intended_for is None or intended_for is not "Unknown_Group": ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_112"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_112_1" aria-expanded="false" aria-controls="job_list___sub_collapse_112_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_112_1"><button class="btn btn-outline-danger"><span class="job_id">112 : Job ID 6b9e836a076d4832b78497edc7bf1a5b</span></button></div></a><div aria-labelledby="job_list___sub_heading_112_1" data-parent="#job_list___sub_accordion_112" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_112_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 36), end pos: (290, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is not None or intended_for == "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_113"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_113_1" aria-expanded="false" aria-controls="job_list___sub_collapse_113_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_113_1"><button class="btn btn-outline-success"><span class="job_id">113 : Job ID cb089df7a3674833bc7cd918cdf6ba3b</span></button></div></a><div aria-labelledby="job_list___sub_heading_113_1" data-parent="#job_list___sub_accordion_113" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_113_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=304" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (304, 35), end pos: (304, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -301,7 +301,7 @@ ), {"path": str(file_path)}, ).first() - if file_record is None: + if file_record is not None: return jsonify({"error": "File record not found"}), 500 did = file_record.id </pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_114"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_114_1" aria-expanded="false" aria-controls="job_list___sub_collapse_114_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_114_1"><button class="btn btn-outline-success"><span class="job_id">114 : Job ID 0f8e20befa0c4e3bbb0ad93002116bf4</span></button></div></a><div aria-labelledby="job_list___sub_heading_114_1" data-parent="#job_list___sub_accordion_114" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_114_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=104" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (104, 30), end pos: (104, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -101,7 +101,7 @@ # Try to create watermarked PDF pdf_result = self._create_watermarked_pdf_for_session(session_secret) - if pdf_result is not None: + if pdf_result is None: return pdf_result # Return error response if PDF creation failed return jsonify(result), 200</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) &gt; response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:920: in full_dispatch_request return self.finalize_request(rv) ^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:939: in finalize_request response = self.make_response(rv) ^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;Flask 'server'&gt;, rv = None def make_response(self, rv: ft.ResponseReturnValue) -&gt; Response: """Convert the return value from a view function to an instance of :attr:`response_class`. :param rv: the return value from the view function. The view function must return a response. Returning ``None``, or the view ending without returning, is not allowed. The following types are allowed for ``view_rv``: ``str`` A response object is created with the string encoded to UTF-8 as the body. ``bytes`` A response object is created with the bytes as the body. ``dict`` A dictionary that will be jsonify'd before being returned. ``list`` A list that will be jsonify'd before being returned. ``generator`` or ``iterator`` A generator that returns ``str`` or ``bytes`` to be streamed as the response. ``tuple`` Either ``(body, status, headers)``, ``(body, status)``, or ``(body, headers)``, where ``body`` is any of the other types allowed here, ``status`` is a string or an integer, and ``headers`` is a dictionary or a list of ``(key, value)`` tuples. If ``body`` is a :attr:`response_class` instance, ``status`` overwrites the exiting value and ``headers`` are extended. :attr:`response_class` The object is returned unchanged. other :class:`~werkzeug.wrappers.Response` class The object is coerced to :attr:`response_class`. :func:`callable` The function is called as a WSGI application. The result is used to create a response object. .. versionchanged:: 2.2 A generator will be converted to a streaming response. A list will be converted to a JSON response. .. versionchanged:: 1.1 A dict will be converted to a JSON response. .. versionchanged:: 0.9 Previously a tuple was interpreted as the arguments for the response object. """ status: int | None = None headers: HeadersValue | None = None # unpack tuple returns if isinstance(rv, tuple): len_rv = len(rv) # a 3-tuple is unpacked directly if len_rv == 3: rv, status, headers = rv # type: ignore[misc] # decide if a 2-tuple has status or headers elif len_rv == 2: if isinstance(rv[1], (Headers, dict, tuple, list)): rv, headers = rv # pyright: ignore else: rv, status = rv # type: ignore[assignment,misc] # other sized tuples are not allowed else: raise TypeError( "The view function did not return a valid response tuple." " The tuple must have the form (body, status, headers)," " (body, status), or (body, headers)." ) # the body must not be None if rv is None: &gt; raise TypeError( f"The view function for {request.endpoint!r} did not" " return a valid response. The function either returned" " None or ended without a return statement." ) E TypeError: The view function for 'rmap_get_link' did not return a valid response. The function either returned None or ended without a return statement. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1212: TypeError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - TypeError: The view function... FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_115"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_115_1" aria-expanded="false" aria-controls="job_list___sub_collapse_115_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_115_1"><button class="btn btn-outline-success"><span class="job_id">115 : Job ID ba97186f0471474ab03392f4074827bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_115_1" data-parent="#job_list___sub_accordion_115" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_115_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (166, 15), end pos: (166, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -163,7 +163,7 @@ file_path = Path(__file__).parent / "static" / "Group_13.pdf" file_path = file_path.resolve() - if not file_path.exists(): + if file_path.exists(): self.app.logger.error(f"Source PDF not found: {file_path}") return jsonify({"error": "Source PDF not found"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:167 Source PDF not found: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\static\Group_13.pdf ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_116"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_116_1" aria-expanded="false" aria-controls="job_list___sub_collapse_116_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_116_1"><button class="btn btn-outline-success"><span class="job_id">116 : Job ID ed649cca41ef4125b51fd2c897bb5aed</span></button></div></a><div aria-labelledby="job_list___sub_heading_116_1" data-parent="#job_list___sub_accordion_116" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_116_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=182" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (182, 23), end pos: (182, 26)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -179,7 +179,7 @@ {"path": str(file_path)}, ).first() - if not existing_file: + if existing_file: # Need to insert a full Documents row following schema: # (name, path, ownerid, sha256, size) # We don't have an authenticated user in RMAP flow, so we</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_117"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_117_1" aria-expanded="false" aria-controls="job_list___sub_collapse_117_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_117_1"><button class="btn btn-outline-success"><span class="job_id">117 : Job ID 80cb8c5905ed4ab1b9360f5de23f78b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_117_1" data-parent="#job_list___sub_accordion_117" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_117_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=191" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (191, 27), end pos: (191, 30)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -188,7 +188,7 @@ owner_row = conn.execute( text("SELECT id FROM Users WHERE email = 'service@rmap.su'") ).first() - if not owner_row: + if owner_row: raise RuntimeError( "No users exist to own RMAP base document; " "create a user first"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_118"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_118_1" aria-expanded="false" aria-controls="job_list___sub_collapse_118_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_118_1"><button class="btn btn-outline-danger"><span class="job_id">118 : Job ID 06122069f77a46e5a89038607d0450b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_118_1" data-parent="#job_list___sub_accordion_118" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_118_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=240" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (240, 35), end pos: (240, 38)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -237,7 +237,7 @@ ), {"path": str(file_path)}, ).first() - if not existing_file: + if existing_file: raise race_e except Exception: raise</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_119"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_119_1" aria-expanded="false" aria-controls="job_list___sub_collapse_119_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_119_1"><button class="btn btn-outline-success"><span class="job_id">119 : Job ID 66387fc325534c65a9fad1561851f29e</span></button></div></a><div aria-labelledby="job_list___sub_heading_119_1" data-parent="#job_list___sub_accordion_119" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_119_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=257" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (257, 15), end pos: (257, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -254,7 +254,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=None ) - if not applicable: + if applicable: return jsonify({"error": "Watermarking not applicable to PDF"}), 500 # Apply watermark</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_120"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_120_1" aria-expanded="false" aria-controls="job_list___sub_collapse_120_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_120_1"><button class="btn btn-outline-success"><span class="job_id">120 : Job ID cb5f594b802b42b888ac641df8cbbd18</span></button></div></a><div aria-labelledby="job_list___sub_heading_120_1" data-parent="#job_list___sub_accordion_120" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_120_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 15), end pos: (269, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_121"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_121_1" aria-expanded="false" aria-controls="job_list___sub_collapse_121_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_121_1"><button class="btn btn-outline-success"><span class="job_id">121 : Job ID 8fa96ce664074483ba5c28574817cb64</span></button></div></a><div aria-labelledby="job_list___sub_heading_121_1" data-parent="#job_list___sub_accordion_121" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_121_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=79" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (79, 15), end pos: (79, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -76,7 +76,7 @@ payload = request.get_json(silent=True) or {} result = self.rmap_instance.handle_message1(payload) - if "error" in result: + if not "error" in result: return jsonify(result), 400 if "required" in result["error"] else 503 return jsonify(result), 200</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 19.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_122"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_122_1" aria-expanded="false" aria-controls="job_list___sub_collapse_122_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_122_1"><button class="btn btn-outline-success"><span class="job_id">122 : Job ID 77123dbd47644ba9bd80cef91a152a58</span></button></div></a><div aria-labelledby="job_list___sub_heading_122_1" data-parent="#job_list___sub_accordion_122" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_122_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (80, 47), end pos: (80, 76)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -77,7 +77,7 @@ result = self.rmap_instance.handle_message1(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if not "required" in result["error"] else 503 return jsonify(result), 200 </pre></div><div class="alert alert-secondary"><pre class="diff">............F............................. [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") &gt; assert response.status_code == 400 E assert 503 == 400 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:543: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 503 == 400 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_123"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_123_1" aria-expanded="false" aria-controls="job_list___sub_collapse_123_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_123_1"><button class="btn btn-outline-success"><span class="job_id">123 : Job ID e9d59799aaf04fa8825d346706fd638d</span></button></div></a><div aria-labelledby="job_list___sub_heading_123_1" data-parent="#job_list___sub_accordion_123" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_123_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=95" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (95, 15), end pos: (95, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -92,7 +92,7 @@ payload = request.get_json(silent=True) or {} result = self.rmap_instance.handle_message2(payload) - if "error" in result: + if not "error" in result: return jsonify(result), 400 if "required" in result["error"] else 503 # If RMAP authentication succeeded, create watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_124"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_124_1" aria-expanded="false" aria-controls="job_list___sub_collapse_124_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_124_1"><button class="btn btn-outline-success"><span class="job_id">124 : Job ID cf42b847d22142e8a1765c873c433c9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_124_1" data-parent="#job_list___sub_accordion_124" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_124_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (96, 47), end pos: (96, 76)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -93,7 +93,7 @@ result = self.rmap_instance.handle_message2(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if not "required" in result["error"] else 503 # If RMAP authentication succeeded, create watermarked PDF if "result" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.............F............................ [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ef2f29c1820524fb1'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") &gt; assert response.status_code == 400 E assert 503 == 400 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:596: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 400 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_125"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_125_1" aria-expanded="false" aria-controls="job_list___sub_collapse_125_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_125_1"><button class="btn btn-outline-success"><span class="job_id">125 : Job ID e5120d68210b4ee5a9a1b2435986a52f</span></button></div></a><div aria-labelledby="job_list___sub_heading_125_1" data-parent="#job_list___sub_accordion_125" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_125_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (99, 15), end pos: (99, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -96,7 +96,7 @@ return jsonify(result), 400 if "required" in result["error"] else 503 # If RMAP authentication succeeded, create watermarked PDF - if "result" in result: + if not "result" in result: session_secret = result["result"] # Try to create watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e5f1e0cadf9bcf71f'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:719 Version not found for link: 0000000000bc614e5f1e0cadf9bcf71f ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_126"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_126_1" aria-expanded="false" aria-controls="job_list___sub_collapse_126_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_126_1"><button class="btn btn-outline-success"><span class="job_id">126 : Job ID a65ddc4997ce4576a03ad52d5dac3aaf</span></button></div></a><div aria-labelledby="job_list___sub_heading_126_1" data-parent="#job_list___sub_accordion_126" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_126_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=104" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (104, 19), end pos: (104, 41)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -101,7 +101,7 @@ # Try to create watermarked PDF pdf_result = self._create_watermarked_pdf_for_session(session_secret) - if pdf_result is not None: + if not pdf_result is not None: return pdf_result # Return error response if PDF creation failed return jsonify(result), 200</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) &gt; response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:920: in full_dispatch_request return self.finalize_request(rv) ^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:939: in finalize_request response = self.make_response(rv) ^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;Flask 'server'&gt;, rv = None def make_response(self, rv: ft.ResponseReturnValue) -&gt; Response: """Convert the return value from a view function to an instance of :attr:`response_class`. :param rv: the return value from the view function. The view function must return a response. Returning ``None``, or the view ending without returning, is not allowed. The following types are allowed for ``view_rv``: ``str`` A response object is created with the string encoded to UTF-8 as the body. ``bytes`` A response object is created with the bytes as the body. ``dict`` A dictionary that will be jsonify'd before being returned. ``list`` A list that will be jsonify'd before being returned. ``generator`` or ``iterator`` A generator that returns ``str`` or ``bytes`` to be streamed as the response. ``tuple`` Either ``(body, status, headers)``, ``(body, status)``, or ``(body, headers)``, where ``body`` is any of the other types allowed here, ``status`` is a string or an integer, and ``headers`` is a dictionary or a list of ``(key, value)`` tuples. If ``body`` is a :attr:`response_class` instance, ``status`` overwrites the exiting value and ``headers`` are extended. :attr:`response_class` The object is returned unchanged. other :class:`~werkzeug.wrappers.Response` class The object is coerced to :attr:`response_class`. :func:`callable` The function is called as a WSGI application. The result is used to create a response object. .. versionchanged:: 2.2 A generator will be converted to a streaming response. A list will be converted to a JSON response. .. versionchanged:: 1.1 A dict will be converted to a JSON response. .. versionchanged:: 0.9 Previously a tuple was interpreted as the arguments for the response object. """ status: int | None = None headers: HeadersValue | None = None # unpack tuple returns if isinstance(rv, tuple): len_rv = len(rv) # a 3-tuple is unpacked directly if len_rv == 3: rv, status, headers = rv # type: ignore[misc] # decide if a 2-tuple has status or headers elif len_rv == 2: if isinstance(rv[1], (Headers, dict, tuple, list)): rv, headers = rv # pyright: ignore else: rv, status = rv # type: ignore[assignment,misc] # other sized tuples are not allowed else: raise TypeError( "The view function did not return a valid response tuple." " The tuple must have the form (body, status, headers)," " (body, status), or (body, headers)." ) # the body must not be None if rv is None: &gt; raise TypeError( f"The view function for {request.endpoint!r} did not" " return a valid response. The function either returned" " None or ended without a return statement." ) E TypeError: The view function for 'rmap_get_link' did not return a valid response. The function either returned None or ended without a return statement. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1212: TypeError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - TypeError: The view function... FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_127"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_127_1" aria-expanded="false" aria-controls="job_list___sub_collapse_127_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_127_1"><button class="btn btn-outline-success"><span class="job_id">127 : Job ID 41263412ae7b40e08a8ad3c3bd66385d</span></button></div></a><div aria-labelledby="job_list___sub_heading_127_1" data-parent="#job_list___sub_accordion_127" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_127_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=135" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (135, 19), end pos: (135, 35)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -132,7 +132,7 @@ {"link": session_secret}, ).first() - if existing_version: + if not existing_version: # Check if the file actually exists on disk existing_path = Path(existing_version.path) if existing_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_128"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_128_1" aria-expanded="false" aria-controls="job_list___sub_collapse_128_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_128_1"><button class="btn btn-outline-danger"><span class="job_id">128 : Job ID 8e50fafdacef443a9bed1ce0548fd76c</span></button></div></a><div aria-labelledby="job_list___sub_heading_128_1" data-parent="#job_list___sub_accordion_128" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_128_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=138" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (138, 23), end pos: (138, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -135,7 +135,7 @@ if existing_version: # Check if the file actually exists on disk existing_path = Path(existing_version.path) - if existing_path.exists(): + if not existing_path.exists(): self.app.logger.info( f"RMAP watermarked PDF already exists: {session_secret}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_129"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_129_1" aria-expanded="false" aria-controls="job_list___sub_collapse_129_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_129_1"><button class="btn btn-outline-success"><span class="job_id">129 : Job ID cc729b1bd30f47cfa09a99d9c1e6c84f</span></button></div></a><div aria-labelledby="job_list___sub_heading_129_1" data-parent="#job_list___sub_accordion_129" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_129_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (166, 15), end pos: (166, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -163,7 +163,7 @@ file_path = Path(__file__).parent / "static" / "Group_13.pdf" file_path = file_path.resolve() - if not file_path.exists(): + if not not file_path.exists(): self.app.logger.error(f"Source PDF not found: {file_path}") return jsonify({"error": "Source PDF not found"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:167 Source PDF not found: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\static\Group_13.pdf ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_130"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_130_1" aria-expanded="false" aria-controls="job_list___sub_collapse_130_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_130_1"><button class="btn btn-outline-success"><span class="job_id">130 : Job ID eaf17130ac5a47e6a09b660a82323283</span></button></div></a><div aria-labelledby="job_list___sub_heading_130_1" data-parent="#job_list___sub_accordion_130" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_130_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=182" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (182, 23), end pos: (182, 40)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -179,7 +179,7 @@ {"path": str(file_path)}, ).first() - if not existing_file: + if not not existing_file: # Need to insert a full Documents row following schema: # (name, path, ownerid, sha256, size) # We don't have an authenticated user in RMAP flow, so we</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_131"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_131_1" aria-expanded="false" aria-controls="job_list___sub_collapse_131_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_131_1"><button class="btn btn-outline-success"><span class="job_id">131 : Job ID 5bff99b17e234b4093c7ab1f8d37e43a</span></button></div></a><div aria-labelledby="job_list___sub_heading_131_1" data-parent="#job_list___sub_accordion_131" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_131_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=191" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (191, 27), end pos: (191, 40)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -188,7 +188,7 @@ owner_row = conn.execute( text("SELECT id FROM Users WHERE email = 'service@rmap.su'") ).first() - if not owner_row: + if not not owner_row: raise RuntimeError( "No users exist to own RMAP base document; " "create a user first"</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_132"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_132_1" aria-expanded="false" aria-controls="job_list___sub_collapse_132_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_132_1"><button class="btn btn-outline-danger"><span class="job_id">132 : Job ID f7d40018d31d4b6788203a83d6cef541</span></button></div></a><div aria-labelledby="job_list___sub_heading_132_1" data-parent="#job_list___sub_accordion_132" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_132_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=240" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (240, 35), end pos: (240, 52)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -237,7 +237,7 @@ ), {"path": str(file_path)}, ).first() - if not existing_file: + if not not existing_file: raise race_e except Exception: raise</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_133"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_133_1" aria-expanded="false" aria-controls="job_list___sub_collapse_133_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_133_1"><button class="btn btn-outline-success"><span class="job_id">133 : Job ID de76bbbc01414c838e892932794a7d2f</span></button></div></a><div aria-labelledby="job_list___sub_heading_133_1" data-parent="#job_list___sub_accordion_133" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_133_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=257" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (257, 15), end pos: (257, 29)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -254,7 +254,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=None ) - if not applicable: + if not not applicable: return jsonify({"error": "Watermarking not applicable to PDF"}), 500 # Apply watermark</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_134"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_134_1" aria-expanded="false" aria-controls="job_list___sub_collapse_134_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_134_1"><button class="btn btn-outline-success"><span class="job_id">134 : Job ID 51ed8167e5384b6691e6fef6efddf7f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_134_1" data-parent="#job_list___sub_accordion_134" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_134_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 15), end pos: (269, 80)</button></a></pre><pre>operator: core/AddNot, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_135"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_135_1" aria-expanded="false" aria-controls="job_list___sub_collapse_135_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_135_1"><button class="btn btn-outline-success"><span class="job_id">135 : Job ID ea751c334657441785ab9c535a49d009</span></button></div></a><div aria-labelledby="job_list___sub_heading_135_1" data-parent="#job_list___sub_accordion_135" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_135_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 23), end pos: (290, 78)</button></a></pre><pre>operator: core/AddNot, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if not intended_for is None or intended_for == "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123929166249Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123930042528Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_136"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_136_1" aria-expanded="false" aria-controls="job_list___sub_collapse_136_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_136_1"><button class="btn btn-outline-success"><span class="job_id">136 : Job ID fe8674d3b40648759931713ece51a885</span></button></div></a><div aria-labelledby="job_list___sub_heading_136_1" data-parent="#job_list___sub_accordion_136" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_136_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=304" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (304, 23), end pos: (304, 42)</button></a></pre><pre>operator: core/AddNot, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -301,7 +301,7 @@ ), {"path": str(file_path)}, ).first() - if file_record is None: + if not file_record is None: return jsonify({"error": "File record not found"}), 500 did = file_record.id </pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_137"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_137_1" aria-expanded="false" aria-controls="job_list___sub_collapse_137_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_137_1"><button class="btn btn-outline-success"><span class="job_id">137 : Job ID ad95a3fa7fdf4e898064f16106645613</span></button></div></a><div aria-labelledby="job_list___sub_heading_137_1" data-parent="#job_list___sub_accordion_137" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_137_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (76, 46), end pos: (76, 50)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -73,7 +73,7 @@ def handle_rmap_initiate(self): """Handle RMAP message 1 (initiate authentication).""" try: - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} result = self.rmap_instance.handle_message1(payload) if "error" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">............F............................. [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") &gt; assert response.status_code == 400 E assert 503 == 400 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:543: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 503 == 400 1 failed, 41 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_138"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_138_1" aria-expanded="false" aria-controls="job_list___sub_collapse_138_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_138_1"><button class="btn btn-outline-success"><span class="job_id">138 : Job ID f407eca82c104e839c3a0daad4da5a8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_138_1" data-parent="#job_list___sub_accordion_138" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_138_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (92, 46), end pos: (92, 50)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -89,7 +89,7 @@ def handle_rmap_get_link(self): """Handle RMAP message 2 (get session link).""" try: - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} result = self.rmap_instance.handle_message2(payload) if "error" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.F............................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124600612863Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124601535906Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ebb7e80f797844cfa'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") &gt; assert response.status_code == 400 E assert 503 == 400 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:596: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 400 11 failed, 31 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_139"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_139_1" aria-expanded="false" aria-controls="job_list___sub_collapse_139_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_139_1"><button class="btn btn-outline-danger"><span class="job_id">139 : Job ID 845b4f693dfc4ca193ac8a08362cb2ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_139_1" data-parent="#job_list___sub_accordion_139" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_139_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (274, 35), end pos: (274, 39)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -271,7 +271,7 @@ # Create destination directory and file rmap_dir = storage_root / "rmap_watermarks" - rmap_dir.mkdir(parents=True, exist_ok=True) + rmap_dir.mkdir(parents=False, exist_ok=True) dest_filename = f"rmap_{session_secret}.pdf" dest_path = rmap_dir / dest_filename</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_140"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_140_1" aria-expanded="false" aria-controls="job_list___sub_collapse_140_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_140_1"><button class="btn btn-outline-info"><span class="job_id">140 : Job ID a4db398af42f4a21b16fc78a26d205d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_140_1" data-parent="#job_list___sub_accordion_140" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_140_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (274, 50), end pos: (274, 54)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 2260: invalid continuation byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_141"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_141_1" aria-expanded="false" aria-controls="job_list___sub_collapse_141_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_141_1"><button class="btn btn-outline-danger"><span class="job_id">141 : Job ID 1a464b488be6464089add6625e12b95f</span></button></div></a><div aria-labelledby="job_list___sub_heading_141_1" data-parent="#job_list___sub_accordion_141" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_141_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (337, 48), end pos: (337, 52)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -334,7 +334,7 @@ except Exception as db_e: # If database insert fails, clean up the file try: - dest_path.unlink(missing_ok=True) + dest_path.unlink(missing_ok=False) except Exception as cleanup_e: self.app.logger.error( f"Failed to cleanup file after DB error: {cleanup_e}"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_142"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_142_1" aria-expanded="false" aria-controls="job_list___sub_collapse_142_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_142_1"><button class="btn btn-outline-success"><span class="job_id">142 : Job ID 0185c85b98aa4cd4a1bea8e468ff3bee</span></button></div></a><div aria-labelledby="job_list___sub_heading_142_1" data-parent="#job_list___sub_accordion_142" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_142_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (76, 52), end pos: (76, 54)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -73,7 +73,7 @@ def handle_rmap_initiate(self): """Handle RMAP message 1 (initiate authentication).""" try: - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} result = self.rmap_instance.handle_message1(payload) if "error" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 400 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 400 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 16.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_143"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_143_1" aria-expanded="false" aria-controls="job_list___sub_collapse_143_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_143_1"><button class="btn btn-outline-success"><span class="job_id">143 : Job ID a0bac8c557b0468a94e2a5fba2c51362</span></button></div></a><div aria-labelledby="job_list___sub_heading_143_1" data-parent="#job_list___sub_accordion_143" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_143_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (92, 52), end pos: (92, 54)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -89,7 +89,7 @@ def handle_rmap_get_link(self): """Handle RMAP message 2 (get session link).""" try: - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} result = self.rmap_instance.handle_message2(payload) if "error" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 400 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_144"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_144_1" aria-expanded="false" aria-controls="job_list___sub_collapse_144_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_144_1"><button class="btn btn-outline-danger"><span class="job_id">144 : Job ID d2b64fc2dbfc4dc1a4973d60c3718577</span></button></div></a><div aria-labelledby="job_list___sub_heading_144_1" data-parent="#job_list___sub_accordion_144" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_144_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 59), end pos: (269, 61)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) and len(wm_bytes) == 0: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_145"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_145_1" aria-expanded="false" aria-controls="job_list___sub_collapse_145_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_145_1"><button class="btn btn-outline-danger"><span class="job_id">145 : Job ID cde629992ded472d8bd989a94a17b704</span></button></div></a><div aria-labelledby="job_list___sub_heading_145_1" data-parent="#job_list___sub_accordion_145" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_145_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (290, 44), end pos: (290, 46)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -287,7 +287,7 @@ intended_for = self.rmap_instance.get_session_identity( session_secret ) - if intended_for is None or intended_for == "Unknown_Group": + if intended_for is None and intended_for == "Unknown_Group": # Use a more descriptive fallback that # indicates RMAP authentication intended_for = "RMAP_CLIENT"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_146"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_146_1" aria-expanded="false" aria-controls="job_list___sub_collapse_146_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_146_1"><button class="btn btn-outline-danger"><span class="job_id">146 : Job ID 491d2b59de7443ae9b563f2700fe2bcf</span></button></div></a><div aria-labelledby="job_list___sub_heading_146_1" data-parent="#job_list___sub_accordion_146" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_146_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (84, 15), end pos: (84, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -81,7 +81,7 @@ return jsonify(result), 200 - except Exception as e: + except CosmicRayTestingException as e: return jsonify( {"error": f"RMAP system initialization failed: {str(e)}"} ), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_147"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_147_1" aria-expanded="false" aria-controls="job_list___sub_collapse_147_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_147_1"><button class="btn btn-outline-success"><span class="job_id">147 : Job ID 01bb6cea4c564af7abb2918f6fb28f4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_147_1" data-parent="#job_list___sub_accordion_147" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_147_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (109, 15), end pos: (109, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -106,7 +106,7 @@ return jsonify(result), 200 - except Exception as e: + except CosmicRayTestingException as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213027660111Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213028481349Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_148"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_148_1" aria-expanded="false" aria-controls="job_list___sub_collapse_148_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_148_1"><button class="btn btn-outline-danger"><span class="job_id">148 : Job ID 5492e885668b46a79f1d1b53271b42e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_148_1" data-parent="#job_list___sub_accordion_148" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_148_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=155" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (155, 15), end pos: (155, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -152,7 +152,7 @@ f" {session_secret}" ) - except Exception as e: + except CosmicRayTestingException as e: return jsonify({"error": f"Database error: {str(e)}"}), 500 # Create watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_149"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_149_1" aria-expanded="false" aria-controls="job_list___sub_collapse_149_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_149_1"><button class="btn btn-outline-danger"><span class="job_id">149 : Job ID a44a2d16cdfe4564abde837a7457a76d</span></button></div></a><div aria-labelledby="job_list___sub_heading_149_1" data-parent="#job_list___sub_accordion_149" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_149_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (201, 31), end pos: (201, 40)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -198,7 +198,7 @@ # Gather file metadata try: pdf_bytes = file_path.read_bytes() - except Exception as fe: + except CosmicRayTestingException as fe: raise RuntimeError( f"Failed reading source PDF for RMAP insertion: {fe}" ) from fe</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_150"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_150_1" aria-expanded="false" aria-controls="job_list___sub_collapse_150_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_150_1"><button class="btn btn-outline-success"><span class="job_id">150 : Job ID f373337909c3448d977a9ce70ac1272e</span></button></div></a><div aria-labelledby="job_list___sub_heading_150_1" data-parent="#job_list___sub_accordion_150" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_150_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (229, 31), end pos: (229, 40)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -226,7 +226,7 @@ "size": int(size), }, ) - except Exception as race_e: + except CosmicRayTestingException as race_e: # If due to unique path constraint, fetch existing id; # otherwise re-raise try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123400274037Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123401190151Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_151"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_151_1" aria-expanded="false" aria-controls="job_list___sub_collapse_151_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_151_1"><button class="btn btn-outline-danger"><span class="job_id">151 : Job ID 50caa0e7bd224669b914029d382bfc12</span></button></div></a><div aria-labelledby="job_list___sub_heading_151_1" data-parent="#job_list___sub_accordion_151" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_151_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=242" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (242, 35), end pos: (242, 44)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -239,7 +239,7 @@ ).first() if not existing_file: raise race_e - except Exception: + except CosmicRayTestingException: raise except Exception as db_e: self.app.logger.error(f"Failed to add source PDF to database: {db_e}")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_152"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_152_1" aria-expanded="false" aria-controls="job_list___sub_collapse_152_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_152_1"><button class="btn btn-outline-danger"><span class="job_id">152 : Job ID f63feab78f51437f8bb4e21243215ed5</span></button></div></a><div aria-labelledby="job_list___sub_heading_152_1" data-parent="#job_list___sub_accordion_152" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_152_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=244" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (244, 19), end pos: (244, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -241,7 +241,7 @@ raise race_e except Exception: raise - except Exception as db_e: + except CosmicRayTestingException as db_e: self.app.logger.error(f"Failed to add source PDF to database: {db_e}") return jsonify({"error": f"Database error: {str(db_e)}"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_153"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_153_1" aria-expanded="false" aria-controls="job_list___sub_collapse_153_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_153_1"><button class="btn btn-outline-danger"><span class="job_id">153 : Job ID 6583082fe27b48e683e66471add42be3</span></button></div></a><div aria-labelledby="job_list___sub_heading_153_1" data-parent="#job_list___sub_accordion_153" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_153_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=334" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (334, 19), end pos: (334, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -331,7 +331,7 @@ ) return None # Success - except Exception as db_e: + except CosmicRayTestingException as db_e: # If database insert fails, clean up the file try: dest_path.unlink(missing_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_154"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_154_1" aria-expanded="false" aria-controls="job_list___sub_collapse_154_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_154_1"><button class="btn btn-outline-danger"><span class="job_id">154 : Job ID 9e87742b1aa5419a88f9f9e058952f2a</span></button></div></a><div aria-labelledby="job_list___sub_heading_154_1" data-parent="#job_list___sub_accordion_154" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_154_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=338" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (338, 23), end pos: (338, 32)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -335,7 +335,7 @@ # If database insert fails, clean up the file try: dest_path.unlink(missing_ok=True) - except Exception as cleanup_e: + except CosmicRayTestingException as cleanup_e: self.app.logger.error( f"Failed to cleanup file after DB error: {cleanup_e}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_155"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_155_1" aria-expanded="false" aria-controls="job_list___sub_collapse_155_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_155_1"><button class="btn btn-outline-danger"><span class="job_id">155 : Job ID 4ad0562b9fce4b72870eac1d211a5393</span></button></div></a><div aria-labelledby="job_list___sub_heading_155_1" data-parent="#job_list___sub_accordion_155" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_155_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=351" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (351, 15), end pos: (351, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -348,7 +348,7 @@ {"error": f"Database insertion failed: {str(db_e)}"} ), 500 - except Exception as e: + except CosmicRayTestingException as e: self.app.logger.error( f"Failed to create watermarked PDF for session" f" {session_secret}: {str(e)}"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_156"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_156_1" aria-expanded="false" aria-controls="job_list___sub_collapse_156_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_156_1"><button class="btn btn-outline-success"><span class="job_id">156 : Job ID dd55f84dadf14c23ac7cf3820fa230ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_156_1" data-parent="#job_list___sub_accordion_156" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_156_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (80, 40), end pos: (80, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -77,7 +77,7 @@ result = self.rmap_instance.handle_message1(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 401 if "required" in result["error"] else 503 return jsonify(result), 200 </pre></div><div class="alert alert-secondary"><pre class="diff">............F............................. [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") &gt; assert response.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:543: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_157"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_157_1" aria-expanded="false" aria-controls="job_list___sub_collapse_157_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_157_1"><button class="btn btn-outline-success"><span class="job_id">157 : Job ID e900e9211aa540ae8532cabd732cb075</span></button></div></a><div aria-labelledby="job_list___sub_heading_157_1" data-parent="#job_list___sub_accordion_157" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_157_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (80, 40), end pos: (80, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -77,7 +77,7 @@ result = self.rmap_instance.handle_message1(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 399 if "required" in result["error"] else 503 return jsonify(result), 200 </pre></div><div class="alert alert-secondary"><pre class="diff">............F............................. [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") &gt; assert response.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:543: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_158"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_158_1" aria-expanded="false" aria-controls="job_list___sub_collapse_158_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_158_1"><button class="btn btn-outline-success"><span class="job_id">158 : Job ID e81f2b1bd79b4623b41cc8e3d81b36e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_158_1" data-parent="#job_list___sub_accordion_158" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_158_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (80, 82), end pos: (80, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -77,7 +77,7 @@ result = self.rmap_instance.handle_message1(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if "required" in result["error"] else 504 return jsonify(result), 200 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFF............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175720966335Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175721852137Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") assert response.status_code == 400 # Wrong format params response = client.post("/api/rmap-initiate", json={"payload":"wrongformatstring"}) &gt; assert response.status_code == 503 E assert 504 == 503 E + where 504 = &lt;WrapperTestResponse streamed [504 GATEWAY TIMEOUT]&gt;.status_code ..\test\test_api.py:547: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 504 == 503 9 failed, 33 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_159"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_159_1" aria-expanded="false" aria-controls="job_list___sub_collapse_159_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_159_1"><button class="btn btn-outline-success"><span class="job_id">159 : Job ID 1c6c96f0b0874d5a8962b08fbb6a0b0c</span></button></div></a><div aria-labelledby="job_list___sub_heading_159_1" data-parent="#job_list___sub_accordion_159" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_159_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (80, 82), end pos: (80, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -77,7 +77,7 @@ result = self.rmap_instance.handle_message1(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if "required" in result["error"] else 502 return jsonify(result), 200 </pre></div><div class="alert alert-secondary"><pre class="diff">............F............................. [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt and inspect response payload decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) assert decrypted["nonceClient"] == test_nonce assert isinstance(decrypted["nonceServer"], int) # Test with wrong parameters # Missing params response = client.post("/api/rmap-initiate") assert response.status_code == 400 # Wrong format params response = client.post("/api/rmap-initiate", json={"payload":"wrongformatstring"}) &gt; assert response.status_code == 503 E assert 502 == 503 E + where 502 = &lt;WrapperTestResponse streamed [502 BAD GATEWAY]&gt;.status_code ..\test\test_api.py:547: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 502 == 503 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_160"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_160_1" aria-expanded="false" aria-controls="job_list___sub_collapse_160_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_160_1"><button class="btn btn-outline-success"><span class="job_id">160 : Job ID 8661eaa9ba194a75b472bf06d35e2761</span></button></div></a><div aria-labelledby="job_list___sub_heading_160_1" data-parent="#job_list___sub_accordion_160" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_160_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (82, 36), end pos: (82, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -79,7 +79,7 @@ if "error" in result: return jsonify(result), 400 if "required" in result["error"] else 503 - return jsonify(result), 200 + return jsonify(result), 201 except Exception as e: return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 201 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 201 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 19.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_161"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_161_1" aria-expanded="false" aria-controls="job_list___sub_collapse_161_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_161_1"><button class="btn btn-outline-success"><span class="job_id">161 : Job ID f1893c30a3bf4581a57ed739a29fbd33</span></button></div></a><div aria-labelledby="job_list___sub_heading_161_1" data-parent="#job_list___sub_accordion_161" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_161_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (82, 36), end pos: (82, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -79,7 +79,7 @@ if "error" in result: return jsonify(result), 400 if "required" in result["error"] else 503 - return jsonify(result), 200 + return jsonify(result), 199 except Exception as e: return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 199 == 200 E + where 199 = &lt;WrapperTestResponse streamed [199 UNKNOWN]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 199 == 200 E + where 199 = &lt;WrapperTestResponse streamed [199 UNKNOWN]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 199 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 199 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 19.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_162"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_162_1" aria-expanded="false" aria-controls="job_list___sub_collapse_162_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_162_1"><button class="btn btn-outline-danger"><span class="job_id">162 : Job ID e9d0a1435765430d9b020eb046debb62</span></button></div></a><div aria-labelledby="job_list___sub_heading_162_1" data-parent="#job_list___sub_accordion_162" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_162_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=87" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (87, 15), end pos: (87, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -84,7 +84,7 @@ except Exception as e: return jsonify( {"error": f"RMAP system initialization failed: {str(e)}"} - ), 503 + ), 504 def handle_rmap_get_link(self): """Handle RMAP message 2 (get session link)."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_163"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_163_1" aria-expanded="false" aria-controls="job_list___sub_collapse_163_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_163_1"><button class="btn btn-outline-danger"><span class="job_id">163 : Job ID c72398b1535a47a69b06e39190208dc3</span></button></div></a><div aria-labelledby="job_list___sub_heading_163_1" data-parent="#job_list___sub_accordion_163" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_163_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=87" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (87, 15), end pos: (87, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -84,7 +84,7 @@ except Exception as e: return jsonify( {"error": f"RMAP system initialization failed: {str(e)}"} - ), 503 + ), 502 def handle_rmap_get_link(self): """Handle RMAP message 2 (get session link)."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_164"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_164_1" aria-expanded="false" aria-controls="job_list___sub_collapse_164_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_164_1"><button class="btn btn-outline-success"><span class="job_id">164 : Job ID 4a8c76f6efae4ef6882a89feab532fbf</span></button></div></a><div aria-labelledby="job_list___sub_heading_164_1" data-parent="#job_list___sub_accordion_164" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_164_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (96, 40), end pos: (96, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -93,7 +93,7 @@ result = self.rmap_instance.handle_message2(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 401 if "required" in result["error"] else 503 # If RMAP authentication succeeded, create watermarked PDF if "result" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.............F............................ [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ea08c440cd3a8ad91'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") &gt; assert response.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:596: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_165"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_165_1" aria-expanded="false" aria-controls="job_list___sub_collapse_165_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_165_1"><button class="btn btn-outline-success"><span class="job_id">165 : Job ID 9c7c85c2eb1b4e63a65055c9bf0ded92</span></button></div></a><div aria-labelledby="job_list___sub_heading_165_1" data-parent="#job_list___sub_accordion_165" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_165_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (96, 40), end pos: (96, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -93,7 +93,7 @@ result = self.rmap_instance.handle_message2(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 399 if "required" in result["error"] else 503 # If RMAP authentication succeeded, create watermarked PDF if "result" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.............F............................ [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ee888173d7b293c4f'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") &gt; assert response.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:596: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_166"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_166_1" aria-expanded="false" aria-controls="job_list___sub_collapse_166_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_166_1"><button class="btn btn-outline-success"><span class="job_id">166 : Job ID 49199d6fd1ef4069831863718414c6b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_166_1" data-parent="#job_list___sub_accordion_166" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_166_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (96, 82), end pos: (96, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -93,7 +93,7 @@ result = self.rmap_instance.handle_message2(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if "required" in result["error"] else 504 # If RMAP authentication succeeded, create watermarked PDF if "result" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.F............................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145637758545Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145638623807Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e93c52b3c874152a5'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") assert response.status_code == 400 # Wrong format params response = client.post("/api/rmap-get-link", json={"payload":"wrongformatstring"}) &gt; assert response.status_code == 503 E assert 504 == 503 E + where 504 = &lt;WrapperTestResponse streamed [504 GATEWAY TIMEOUT]&gt;.status_code ..\test\test_api.py:600: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 504 == 503 11 failed, 31 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_167"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_167_1" aria-expanded="false" aria-controls="job_list___sub_collapse_167_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_167_1"><button class="btn btn-outline-success"><span class="job_id">167 : Job ID 65678d231bf445beacb58202103eeff6</span></button></div></a><div aria-labelledby="job_list___sub_heading_167_1" data-parent="#job_list___sub_accordion_167" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_167_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (96, 82), end pos: (96, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -93,7 +93,7 @@ result = self.rmap_instance.handle_message2(payload) if "error" in result: - return jsonify(result), 400 if "required" in result["error"] else 503 + return jsonify(result), 400 if "required" in result["error"] else 502 # If RMAP authentication succeeded, create watermarked PDF if "result" in result:</pre></div><div class="alert alert-secondary"><pre class="diff">.............F............................ [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e3046e08b2e065203'} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "result" in json_data assert isinstance(json_data["result"], str) assert len(json_data["result"]) == 32 shared_link["version_link"] = json_data.get("result") # Test with wrong parameters # Missing params response = client.post("/api/rmap-get-link") assert response.status_code == 400 # Wrong format params response = client.post("/api/rmap-get-link", json={"payload":"wrongformatstring"}) &gt; assert response.status_code == 503 E assert 502 == 503 E + where 502 = &lt;WrapperTestResponse streamed [502 BAD GATEWAY]&gt;.status_code ..\test\test_api.py:600: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 502 == 503 1 failed, 41 passed, 23 warnings in 21.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_168"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_168_1" aria-expanded="false" aria-controls="job_list___sub_collapse_168_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_168_1"><button class="btn btn-outline-success"><span class="job_id">168 : Job ID 0e0b8b0cb8984ef6888f580b4206d7ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_168_1" data-parent="#job_list___sub_accordion_168" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_168_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (107, 36), end pos: (107, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -104,7 +104,7 @@ if pdf_result is not None: return pdf_result # Return error response if PDF creation failed - return jsonify(result), 200 + return jsonify(result), 201 except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 201 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_169"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_169_1" aria-expanded="false" aria-controls="job_list___sub_collapse_169_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_169_1"><button class="btn btn-outline-success"><span class="job_id">169 : Job ID 76424fc7e02a478a909d8d5931779214</span></button></div></a><div aria-labelledby="job_list___sub_heading_169_1" data-parent="#job_list___sub_accordion_169" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_169_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (107, 36), end pos: (107, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -104,7 +104,7 @@ if pdf_result is not None: return pdf_result # Return error response if PDF creation failed - return jsonify(result), 200 + return jsonify(result), 199 except Exception as e: return jsonify({"error": f"RMAP system error: {str(e)}"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 199 == 200 E + where 199 = &lt;WrapperTestResponse streamed [199 UNKNOWN]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 199 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_170"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_170_1" aria-expanded="false" aria-controls="job_list___sub_collapse_170_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_170_1"><button class="btn btn-outline-danger"><span class="job_id">170 : Job ID 9ae789561a3b4cd4abf07eff4f5848b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_170_1" data-parent="#job_list___sub_accordion_170" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_170_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (110, 71), end pos: (110, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -107,7 +107,7 @@ return jsonify(result), 200 except Exception as e: - return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 + return jsonify({"error": f"RMAP system error: {str(e)}"}), 504 def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: """</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_171"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_171_1" aria-expanded="false" aria-controls="job_list___sub_collapse_171_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_171_1"><button class="btn btn-outline-danger"><span class="job_id">171 : Job ID 892117b56c0b44e2a8a64b0d33abcab2</span></button></div></a><div aria-labelledby="job_list___sub_heading_171_1" data-parent="#job_list___sub_accordion_171" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_171_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (110, 71), end pos: (110, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -107,7 +107,7 @@ return jsonify(result), 200 except Exception as e: - return jsonify({"error": f"RMAP system error: {str(e)}"}), 503 + return jsonify({"error": f"RMAP system error: {str(e)}"}), 502 def _create_watermarked_pdf_for_session(self, session_secret: str) -&gt; Any | None: """</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_172"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_172_1" aria-expanded="false" aria-controls="job_list___sub_collapse_172_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_172_1"><button class="btn btn-outline-success"><span class="job_id">172 : Job ID 7ebc1754a82245ca843407f10fa36c2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_172_1" data-parent="#job_list___sub_accordion_172" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_172_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (156, 68), end pos: (156, 71)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -153,7 +153,7 @@ ) except Exception as e: - return jsonify({"error": f"Database error: {str(e)}"}), 500 + return jsonify({"error": f"Database error: {str(e)}"}), 501 # Create watermarked PDF try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193012836974Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193013703704Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_173"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_173_1" aria-expanded="false" aria-controls="job_list___sub_collapse_173_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_173_1"><button class="btn btn-outline-danger"><span class="job_id">173 : Job ID 11130e01801940ca95bbdee07e8287d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_173_1" data-parent="#job_list___sub_accordion_173" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_173_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (156, 68), end pos: (156, 71)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -153,7 +153,7 @@ ) except Exception as e: - return jsonify({"error": f"Database error: {str(e)}"}), 500 + return jsonify({"error": f"Database error: {str(e)}"}), 499 # Create watermarked PDF try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_174"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_174_1" aria-expanded="false" aria-controls="job_list___sub_collapse_174_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_174_1"><button class="btn btn-outline-success"><span class="job_id">174 : Job ID 81ee7c34728f49398d20d1f826a3b864</span></button></div></a><div aria-labelledby="job_list___sub_heading_174_1" data-parent="#job_list___sub_accordion_174" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_174_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=168" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (168, 67), end pos: (168, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -165,7 +165,7 @@ if not file_path.exists(): self.app.logger.error(f"Source PDF not found: {file_path}") - return jsonify({"error": "Source PDF not found"}), 500 + return jsonify({"error": "Source PDF not found"}), 501 # Add file to database if not already present try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204913267915Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204914091439Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_175"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_175_1" aria-expanded="false" aria-controls="job_list___sub_collapse_175_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_175_1"><button class="btn btn-outline-danger"><span class="job_id">175 : Job ID 049d7aeade24479b95751c1a11c84f2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_175_1" data-parent="#job_list___sub_accordion_175" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_175_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=168" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (168, 67), end pos: (168, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -165,7 +165,7 @@ if not file_path.exists(): self.app.logger.error(f"Source PDF not found: {file_path}") - return jsonify({"error": "Source PDF not found"}), 500 + return jsonify({"error": "Source PDF not found"}), 499 # Add file to database if not already present try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_176"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_176_1" aria-expanded="false" aria-controls="job_list___sub_collapse_176_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_176_1"><button class="btn btn-outline-danger"><span class="job_id">176 : Job ID 6b463db176d44c1e87cd8eb190022c34</span></button></div></a><div aria-labelledby="job_list___sub_heading_176_1" data-parent="#job_list___sub_accordion_176" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_176_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=246" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (246, 75), end pos: (246, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -243,7 +243,7 @@ raise except Exception as db_e: self.app.logger.error(f"Failed to add source PDF to database: {db_e}") - return jsonify({"error": f"Database error: {str(db_e)}"}), 500 + return jsonify({"error": f"Database error: {str(db_e)}"}), 501 # Use robust-xmp watermarking (best technique) method = "robust-xmp"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_177"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_177_1" aria-expanded="false" aria-controls="job_list___sub_collapse_177_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_177_1"><button class="btn btn-outline-danger"><span class="job_id">177 : Job ID 3e08aa386b974574815cf2dbc0913d0e</span></button></div></a><div aria-labelledby="job_list___sub_heading_177_1" data-parent="#job_list___sub_accordion_177" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_177_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=246" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (246, 75), end pos: (246, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -243,7 +243,7 @@ raise except Exception as db_e: self.app.logger.error(f"Failed to add source PDF to database: {db_e}") - return jsonify({"error": f"Database error: {str(db_e)}"}), 500 + return jsonify({"error": f"Database error: {str(db_e)}"}), 499 # Use robust-xmp watermarking (best technique) method = "robust-xmp"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_178"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_178_1" aria-expanded="false" aria-controls="job_list___sub_collapse_178_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_178_1"><button class="btn btn-outline-danger"><span class="job_id">178 : Job ID 8eea1ce9063746bd8763344b3a632965</span></button></div></a><div aria-labelledby="job_list___sub_heading_178_1" data-parent="#job_list___sub_accordion_178" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_178_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=258" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (258, 81), end pos: (258, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -255,7 +255,7 @@ method=method, pdf=str(file_path), position=None ) if not applicable: - return jsonify({"error": "Watermarking not applicable to PDF"}), 500 + return jsonify({"error": "Watermarking not applicable to PDF"}), 501 # Apply watermark wm_bytes = WMUtils.apply_watermark(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_179"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_179_1" aria-expanded="false" aria-controls="job_list___sub_collapse_179_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_179_1"><button class="btn btn-outline-danger"><span class="job_id">179 : Job ID 04caf417e8a64cc2a18d8d02fd4c9c12</span></button></div></a><div aria-labelledby="job_list___sub_heading_179_1" data-parent="#job_list___sub_accordion_179" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_179_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=258" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (258, 81), end pos: (258, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -255,7 +255,7 @@ method=method, pdf=str(file_path), position=None ) if not applicable: - return jsonify({"error": "Watermarking not applicable to PDF"}), 500 + return jsonify({"error": "Watermarking not applicable to PDF"}), 499 # Apply watermark wm_bytes = WMUtils.apply_watermark(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_180"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_180_1" aria-expanded="false" aria-controls="job_list___sub_collapse_180_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_180_1"><button class="btn btn-outline-danger"><span class="job_id">180 : Job ID 0587ad8c70ac41e09dd9d09fba5add80</span></button></div></a><div aria-labelledby="job_list___sub_heading_180_1" data-parent="#job_list___sub_accordion_180" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_180_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 79), end pos: (269, 80)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 1: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_181"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_181_1" aria-expanded="false" aria-controls="job_list___sub_collapse_181_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_181_1"><button class="btn btn-outline-danger"><span class="job_id">181 : Job ID 97147ce122204e07a616615074d6aa51</span></button></div></a><div aria-labelledby="job_list___sub_heading_181_1" data-parent="#job_list___sub_accordion_181" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_181_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=269" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (269, 79), end pos: (269, 80)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -266,7 +266,7 @@ position=None, ) - if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == -1: return jsonify({"error": "Watermarking produced no output"}), 500 # Create destination directory and file</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_182"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_182_1" aria-expanded="false" aria-controls="job_list___sub_collapse_182_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_182_1"><button class="btn btn-outline-success"><span class="job_id">182 : Job ID 83739facfbaa443e8d0c6476588afbe8</span></button></div></a><div aria-labelledby="job_list___sub_heading_182_1" data-parent="#job_list___sub_accordion_182" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_182_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=270" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (270, 78), end pos: (270, 81)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -267,7 +267,7 @@ ) if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: - return jsonify({"error": "Watermarking produced no output"}), 500 + return jsonify({"error": "Watermarking produced no output"}), 501 # Create destination directory and file rmap_dir = storage_root / "rmap_watermarks"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194332681768Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194333535445Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_183"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_183_1" aria-expanded="false" aria-controls="job_list___sub_collapse_183_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_183_1"><button class="btn btn-outline-danger"><span class="job_id">183 : Job ID 2696cc543b27468a971de269049fc2fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_183_1" data-parent="#job_list___sub_accordion_183" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_183_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=270" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (270, 78), end pos: (270, 81)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -267,7 +267,7 @@ ) if not isinstance(wm_bytes, bytes | bytearray) or len(wm_bytes) == 0: - return jsonify({"error": "Watermarking produced no output"}), 500 + return jsonify({"error": "Watermarking produced no output"}), 499 # Create destination directory and file rmap_dir = storage_root / "rmap_watermarks"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_184"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_184_1" aria-expanded="false" aria-controls="job_list___sub_collapse_184_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_184_1"><button class="btn btn-outline-success"><span class="job_id">184 : Job ID f0ee29ac14344439a4e2c6de4b944761</span></button></div></a><div aria-labelledby="job_list___sub_heading_184_1" data-parent="#job_list___sub_accordion_184" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_184_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=305" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (305, 76), end pos: (305, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -302,7 +302,7 @@ {"path": str(file_path)}, ).first() if file_record is None: - return jsonify({"error": "File record not found"}), 500 + return jsonify({"error": "File record not found"}), 501 did = file_record.id conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114753314025Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114754201483Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_185"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_185_1" aria-expanded="false" aria-controls="job_list___sub_collapse_185_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_185_1"><button class="btn btn-outline-danger"><span class="job_id">185 : Job ID 641c9ced5ab146158760cb5ef4b69346</span></button></div></a><div aria-labelledby="job_list___sub_heading_185_1" data-parent="#job_list___sub_accordion_185" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_185_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=305" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (305, 76), end pos: (305, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -302,7 +302,7 @@ {"path": str(file_path)}, ).first() if file_record is None: - return jsonify({"error": "File record not found"}), 500 + return jsonify({"error": "File record not found"}), 499 did = file_record.id conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_186"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_186_1" aria-expanded="false" aria-controls="job_list___sub_collapse_186_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_186_1"><button class="btn btn-outline-danger"><span class="job_id">186 : Job ID b1a6a505fc7d4fd1ae4c99836e3afe2b</span></button></div></a><div aria-labelledby="job_list___sub_heading_186_1" data-parent="#job_list___sub_accordion_186" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_186_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=349" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (349, 19), end pos: (349, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -346,7 +346,7 @@ ) return jsonify( {"error": f"Database insertion failed: {str(db_e)}"} - ), 500 + ), 501 except Exception as e: self.app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_187"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_187_1" aria-expanded="false" aria-controls="job_list___sub_collapse_187_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_187_1"><button class="btn btn-outline-danger"><span class="job_id">187 : Job ID f127b13f45d94c7fa705dbf902748351</span></button></div></a><div aria-labelledby="job_list___sub_heading_187_1" data-parent="#job_list___sub_accordion_187" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_187_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=349" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (349, 19), end pos: (349, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -346,7 +346,7 @@ ) return jsonify( {"error": f"Database insertion failed: {str(db_e)}"} - ), 500 + ), 499 except Exception as e: self.app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_188"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_188_1" aria-expanded="false" aria-controls="job_list___sub_collapse_188_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_188_1"><button class="btn btn-outline-danger"><span class="job_id">188 : Job ID 46f9b836efea425ab06b20f929044866</span></button></div></a><div aria-labelledby="job_list___sub_heading_188_1" data-parent="#job_list___sub_accordion_188" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_188_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=358" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (358, 15), end pos: (358, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -355,5 +355,5 @@ ) return jsonify( {"error": f"Failed to create watermarked PDF: {str(e)}"} - ), 500 - + ), 501 +</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_189"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_189_1" aria-expanded="false" aria-controls="job_list___sub_collapse_189_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_189_1"><button class="btn btn-outline-danger"><span class="job_id">189 : Job ID 5ab1911338ee438c8a83b73a40b1a4d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_189_1" data-parent="#job_list___sub_accordion_189" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_189_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=rmap_handler.py&amp;line=358" class="text-secondary"><button class="btn btn-outline-dark">rmap_handler.py, start pos: (358, 15), end pos: (358, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- armap_handler.py +++ brmap_handler.py @@ -355,5 +355,5 @@ ) return jsonify( {"error": f"Failed to create watermarked PDF: {str(e)}"} - ), 500 - + ), 499 +</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_190"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_190_1" aria-expanded="false" aria-controls="job_list___sub_collapse_190_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_190_1"><button class="btn btn-outline-danger"><span class="job_id">190 : Job ID 817674c30fe64a799869df705aa08ac8</span></button></div></a><div aria-labelledby="job_list___sub_heading_190_1" data-parent="#job_list___sub_accordion_190" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_190_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] + None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_191"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_191_1" aria-expanded="false" aria-controls="job_list___sub_collapse_191_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_191_1"><button class="btn btn-outline-danger"><span class="job_id">191 : Job ID 39e201c71c17482e94116f14bbde6cc0</span></button></div></a><div aria-labelledby="job_list___sub_heading_191_1" data-parent="#job_list___sub_accordion_191" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_191_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] - None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_192"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_192_1" aria-expanded="false" aria-controls="job_list___sub_collapse_192_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_192_1"><button class="btn btn-outline-danger"><span class="job_id">192 : Job ID 8a993d74fb7d46f4aa12a596968bb070</span></button></div></a><div aria-labelledby="job_list___sub_heading_192_1" data-parent="#job_list___sub_accordion_192" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_192_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] * None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_193"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_193_1" aria-expanded="false" aria-controls="job_list___sub_collapse_193_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_193_1"><button class="btn btn-outline-danger"><span class="job_id">193 : Job ID 01b382472ba7450b992809090fc955f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_193_1" data-parent="#job_list___sub_accordion_193" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_193_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] / None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_194"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_194_1" aria-expanded="false" aria-controls="job_list___sub_collapse_194_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_194_1"><button class="btn btn-outline-danger"><span class="job_id">194 : Job ID af1b3ed1c667471983582b52a0d4c9e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_194_1" data-parent="#job_list___sub_accordion_194" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_194_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] // None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_195"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_195_1" aria-expanded="false" aria-controls="job_list___sub_collapse_195_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_195_1"><button class="btn btn-outline-danger"><span class="job_id">195 : Job ID 31005c017da348fabf374a0b2a068e95</span></button></div></a><div aria-labelledby="job_list___sub_heading_195_1" data-parent="#job_list___sub_accordion_195" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_195_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] % None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_196"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_196_1" aria-expanded="false" aria-controls="job_list___sub_collapse_196_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_196_1"><button class="btn btn-outline-success"><span class="job_id">196 : Job ID b883372c4b864c6485286f3c1bb4ab75</span></button></div></a><div aria-labelledby="job_list___sub_heading_196_1" data-parent="#job_list___sub_accordion_196" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_196_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] ** None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223727818207Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223728673004Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_197"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_197_1" aria-expanded="false" aria-controls="job_list___sub_collapse_197_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_197_1"><button class="btn btn-outline-danger"><span class="job_id">197 : Job ID 58c270dcfad847389af47773f9c14bc0</span></button></div></a><div aria-labelledby="job_list___sub_heading_197_1" data-parent="#job_list___sub_accordion_197" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_197_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] &gt;&gt; None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_198"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_198_1" aria-expanded="false" aria-controls="job_list___sub_collapse_198_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_198_1"><button class="btn btn-outline-danger"><span class="job_id">198 : Job ID 8abe5017935c4f518b0d56d4c31ea298</span></button></div></a><div aria-labelledby="job_list___sub_heading_198_1" data-parent="#job_list___sub_accordion_198" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_198_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] &lt;&lt; None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_199"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_199_1" aria-expanded="false" aria-controls="job_list___sub_collapse_199_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_199_1"><button class="btn btn-outline-danger"><span class="job_id">199 : Job ID e1178431456d47c79e1a7230d5b0f93c</span></button></div></a><div aria-labelledby="job_list___sub_heading_199_1" data-parent="#job_list___sub_accordion_199" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_199_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] &amp; None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_200"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_200_1" aria-expanded="false" aria-controls="job_list___sub_collapse_200_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_200_1"><button class="btn btn-outline-danger"><span class="job_id">200 : Job ID 5b7b88b6ebd74453904fbc4a7b20f847</span></button></div></a><div aria-labelledby="job_list___sub_heading_200_1" data-parent="#job_list___sub_accordion_200" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_200_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (229, 29), end pos: (229, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -226,7 +226,7 @@ # -------------------- -def main(argv: Iterable[str] | None = None) -&gt; int: +def main(argv: Iterable[str] ^ None = None) -&gt; int: parser = build_parser() args = parser.parse_args(list(argv) if argv is not None else None) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_201"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_201_1" aria-expanded="false" aria-controls="job_list___sub_collapse_201_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_201_1"><button class="btn btn-outline-danger"><span class="job_id">201 : Job ID f81c77c2b9334dd89ec72e39c28b9782</span></button></div></a><div aria-labelledby="job_list___sub_heading_201_1" data-parent="#job_list___sub_accordion_201" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_201_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ != "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_202"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_202_1" aria-expanded="false" aria-controls="job_list___sub_collapse_202_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_202_1"><button class="btn btn-outline-danger"><span class="job_id">202 : Job ID 80db37b3c1eb4c84b8117ce857427e7b</span></button></div></a><div aria-labelledby="job_list___sub_heading_202_1" data-parent="#job_list___sub_accordion_202" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_202_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ &lt; "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_203"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_203_1" aria-expanded="false" aria-controls="job_list___sub_collapse_203_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_203_1"><button class="btn btn-outline-danger"><span class="job_id">203 : Job ID 20fc2c62890c4cbca3d9cf99f1abd9e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_203_1" data-parent="#job_list___sub_accordion_203" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_203_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ &lt;= "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_204"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_204_1" aria-expanded="false" aria-controls="job_list___sub_collapse_204_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_204_1"><button class="btn btn-outline-danger"><span class="job_id">204 : Job ID b11a4f4e7d6e41338207c35755b27d35</span></button></div></a><div aria-labelledby="job_list___sub_heading_204_1" data-parent="#job_list___sub_accordion_204" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_204_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ &gt; "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_205"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_205_1" aria-expanded="false" aria-controls="job_list___sub_collapse_205_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_205_1"><button class="btn btn-outline-danger"><span class="job_id">205 : Job ID a92adf1784b64c1d94bb5ffb625bdbb3</span></button></div></a><div aria-labelledby="job_list___sub_heading_205_1" data-parent="#job_list___sub_accordion_205" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_205_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ &gt;= "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_206"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_206_1" aria-expanded="false" aria-controls="job_list___sub_collapse_206_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_206_1"><button class="btn btn-outline-danger"><span class="job_id">206 : Job ID cf0942ef89df433188c232b4a55414ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_206_1" data-parent="#job_list___sub_accordion_206" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_206_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ is "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_207"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_207_1" aria-expanded="false" aria-controls="job_list___sub_collapse_207_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_207_1"><button class="btn btn-outline-danger"><span class="job_id">207 : Job ID abc42bbb64ab4fe893ce5b7d47469f92</span></button></div></a><div aria-labelledby="job_list___sub_heading_207_1" data-parent="#job_list___sub_accordion_207" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_207_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 12), end pos: (252, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if __name__ is not "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_208"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_208_1" aria-expanded="false" aria-controls="job_list___sub_collapse_208_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_208_1"><button class="btn btn-outline-success"><span class="job_id">208 : Job ID 990a409e8f57496c97211e469a6cf1b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_208_1" data-parent="#job_list___sub_accordion_208" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_208_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=66" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (66, 19), end pos: (66, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -63,7 +63,7 @@ def _resolve_secret(args: argparse.Namespace) -&gt; str: - if args.secret is not None: + if args.secret is None: return args.secret if args.secret_file is not None: return _read_text_from_file(args.secret_file)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004623392209Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004624304106Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_209"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_209_1" aria-expanded="false" aria-controls="job_list___sub_collapse_209_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_209_1"><button class="btn btn-outline-danger"><span class="job_id">209 : Job ID 2eb469e87f534a31b3008cc414a74ee8</span></button></div></a><div aria-labelledby="job_list___sub_heading_209_1" data-parent="#job_list___sub_accordion_209" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_209_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (68, 24), end pos: (68, 30)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -65,7 +65,7 @@ def _resolve_secret(args: argparse.Namespace) -&gt; str: if args.secret is not None: return args.secret - if args.secret_file is not None: + if args.secret_file is None: return _read_text_from_file(args.secret_file) if args.secret_stdin: return _read_text_from_stdin()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_210"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_210_1" aria-expanded="false" aria-controls="job_list___sub_collapse_210_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_210_1"><button class="btn btn-outline-danger"><span class="job_id">210 : Job ID 4bb8ed1e425f4ddab80c1c58a8738808</span></button></div></a><div aria-labelledby="job_list___sub_heading_210_1" data-parent="#job_list___sub_accordion_210" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_210_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (77, 16), end pos: (77, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -74,7 +74,7 @@ def _resolve_key(args: argparse.Namespace) -&gt; str: - if args.key is not None: + if args.key is None: return args.key if args.key_file is not None: return _read_text_from_file(args.key_file).strip("\n\r")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_211"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_211_1" aria-expanded="false" aria-controls="job_list___sub_collapse_211_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_211_1"><button class="btn btn-outline-danger"><span class="job_id">211 : Job ID 2428bf4234e7422db71eb3456f27aa84</span></button></div></a><div aria-labelledby="job_list___sub_heading_211_1" data-parent="#job_list___sub_accordion_211" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_211_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=79" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (79, 21), end pos: (79, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -76,7 +76,7 @@ def _resolve_key(args: argparse.Namespace) -&gt; str: if args.key is not None: return args.key - if args.key_file is not None: + if args.key_file is None: return _read_text_from_file(args.key_file).strip("\n\r") if args.key_stdin: return _read_text_from_stdin().strip("\n\r")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_212"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_212_1" aria-expanded="false" aria-controls="job_list___sub_collapse_212_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_212_1"><button class="btn btn-outline-danger"><span class="job_id">212 : Job ID 8cf0a78e8896486cb6de218c434b9052</span></button></div></a><div aria-labelledby="job_list___sub_heading_212_1" data-parent="#job_list___sub_accordion_212" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_212_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=231" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (231, 48), end pos: (231, 54)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -228,7 +228,7 @@ def main(argv: Iterable[str] | None = None) -&gt; int: parser = build_parser() - args = parser.parse_args(list(argv) if argv is not None else None) + args = parser.parse_args(list(argv) if argv is None else None) try: return int(args.func(args))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_213"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_213_1" aria-expanded="false" aria-controls="job_list___sub_collapse_213_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_213_1"><button class="btn btn-outline-danger"><span class="job_id">213 : Job ID 27d1a8a47b844495a188490dfc0928ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_213_1" data-parent="#job_list___sub_accordion_213" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_213_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=60" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (60, 7), end pos: (60, 10)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -57,7 +57,7 @@ def _read_text_from_stdin() -&gt; str: data = sys.stdin.read() - if not data: + if data: raise ValueError("No data received on stdin") return data </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_214"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_214_1" aria-expanded="false" aria-controls="job_list___sub_collapse_214_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_214_1"><button class="btn btn-outline-success"><span class="job_id">214 : Job ID 1a506e509a614cf2ae21d00e036900b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_214_1" data-parent="#job_list___sub_accordion_214" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_214_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=114" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (114, 7), end pos: (114, 10)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -111,7 +111,7 @@ def cmd_embed(args: argparse.Namespace) -&gt; int: key = _resolve_key(args) secret = _resolve_secret(args) - if not is_watermarking_applicable( + if is_watermarking_applicable( method=args.method, pdf=args.input, position=args.position ): print(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T172035768008Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T172036602839Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_215"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_215_1" aria-expanded="false" aria-controls="job_list___sub_collapse_215_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_215_1"><button class="btn btn-outline-danger"><span class="job_id">215 : Job ID 99e81283e6ad4e6ba43c0b9b5974bc46</span></button></div></a><div aria-labelledby="job_list___sub_heading_215_1" data-parent="#job_list___sub_accordion_215" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_215_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=60" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (60, 7), end pos: (60, 15)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -57,7 +57,7 @@ def _read_text_from_stdin() -&gt; str: data = sys.stdin.read() - if not data: + if not not data: raise ValueError("No data received on stdin") return data </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_216"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_216_1" aria-expanded="false" aria-controls="job_list___sub_collapse_216_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_216_1"><button class="btn btn-outline-danger"><span class="job_id">216 : Job ID ea29629b18954a62bf959624a00a571d</span></button></div></a><div aria-labelledby="job_list___sub_heading_216_1" data-parent="#job_list___sub_accordion_216" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_216_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=66" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (66, 7), end pos: (66, 30)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -63,7 +63,7 @@ def _resolve_secret(args: argparse.Namespace) -&gt; str: - if args.secret is not None: + if not args.secret is not None: return args.secret if args.secret_file is not None: return _read_text_from_file(args.secret_file)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_217"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_217_1" aria-expanded="false" aria-controls="job_list___sub_collapse_217_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_217_1"><button class="btn btn-outline-success"><span class="job_id">217 : Job ID a803524c67ed46a6b3ab6c5e3c59bcea</span></button></div></a><div aria-labelledby="job_list___sub_heading_217_1" data-parent="#job_list___sub_accordion_217" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_217_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (68, 7), end pos: (68, 35)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -65,7 +65,7 @@ def _resolve_secret(args: argparse.Namespace) -&gt; str: if args.secret is not None: return args.secret - if args.secret_file is not None: + if not args.secret_file is not None: return _read_text_from_file(args.secret_file) if args.secret_stdin: return _read_text_from_stdin()</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231442190353Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231443123611Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_218"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_218_1" aria-expanded="false" aria-controls="job_list___sub_collapse_218_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_218_1"><button class="btn btn-outline-danger"><span class="job_id">218 : Job ID 387c1220634640c4b7f71225a09ae7e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_218_1" data-parent="#job_list___sub_accordion_218" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_218_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=70" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (70, 7), end pos: (70, 24)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -67,7 +67,7 @@ return args.secret if args.secret_file is not None: return _read_text_from_file(args.secret_file) - if args.secret_stdin: + if not args.secret_stdin: return _read_text_from_stdin() # Interactive fallback return getpass.getpass("Secret: ")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_219"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_219_1" aria-expanded="false" aria-controls="job_list___sub_collapse_219_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_219_1"><button class="btn btn-outline-danger"><span class="job_id">219 : Job ID 883252a5cf4446c0a0c47306102973ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_219_1" data-parent="#job_list___sub_accordion_219" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_219_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (77, 7), end pos: (77, 27)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -74,7 +74,7 @@ def _resolve_key(args: argparse.Namespace) -&gt; str: - if args.key is not None: + if not args.key is not None: return args.key if args.key_file is not None: return _read_text_from_file(args.key_file).strip("\n\r")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_220"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_220_1" aria-expanded="false" aria-controls="job_list___sub_collapse_220_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_220_1"><button class="btn btn-outline-danger"><span class="job_id">220 : Job ID af206acd33534bd7ab7ddf0280b3ff62</span></button></div></a><div aria-labelledby="job_list___sub_heading_220_1" data-parent="#job_list___sub_accordion_220" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_220_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=79" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (79, 7), end pos: (79, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -76,7 +76,7 @@ def _resolve_key(args: argparse.Namespace) -&gt; str: if args.key is not None: return args.key - if args.key_file is not None: + if not args.key_file is not None: return _read_text_from_file(args.key_file).strip("\n\r") if args.key_stdin: return _read_text_from_stdin().strip("\n\r")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_221"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_221_1" aria-expanded="false" aria-controls="job_list___sub_collapse_221_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_221_1"><button class="btn btn-outline-danger"><span class="job_id">221 : Job ID c53d3b2932a04b9d8b7baae34ac61de4</span></button></div></a><div aria-labelledby="job_list___sub_heading_221_1" data-parent="#job_list___sub_accordion_221" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_221_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=81" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (81, 7), end pos: (81, 21)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -78,7 +78,7 @@ return args.key if args.key_file is not None: return _read_text_from_file(args.key_file).strip("\n\r") - if args.key_stdin: + if not args.key_stdin: return _read_text_from_stdin().strip("\n\r") if args.key_prompt: return getpass.getpass("Key: ")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_222"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_222_1" aria-expanded="false" aria-controls="job_list___sub_collapse_222_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_222_1"><button class="btn btn-outline-danger"><span class="job_id">222 : Job ID d3925e78ad28439695a55a505b6d88cd</span></button></div></a><div aria-labelledby="job_list___sub_heading_222_1" data-parent="#job_list___sub_accordion_222" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_222_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=83" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (83, 7), end pos: (83, 22)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -80,7 +80,7 @@ return _read_text_from_file(args.key_file).strip("\n\r") if args.key_stdin: return _read_text_from_stdin().strip("\n\r") - if args.key_prompt: + if not args.key_prompt: return getpass.getpass("Key: ") # If nothing provided, still prompt (safer default) return getpass.getpass("Key: ")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_223"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_223_1" aria-expanded="false" aria-controls="job_list___sub_collapse_223_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_223_1"><button class="btn btn-outline-danger"><span class="job_id">223 : Job ID fa86675fce6941e6a15c0e4027481b02</span></button></div></a><div aria-labelledby="job_list___sub_heading_223_1" data-parent="#job_list___sub_accordion_223" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_223_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (102, 7), end pos: (102, 15)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -99,7 +99,7 @@ def cmd_explore(args: argparse.Namespace) -&gt; int: tree = explore_pdf(args.input) - if args.out: + if not args.out: with open(args.out, "w", encoding="utf-8") as fh: json.dump(tree, fh, indent=2, ensure_ascii=False) else:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_224"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_224_1" aria-expanded="false" aria-controls="job_list___sub_collapse_224_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_224_1"><button class="btn btn-outline-success"><span class="job_id">224 : Job ID 68cda866dc2245e3bc2cdc8dce15fb9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_224_1" data-parent="#job_list___sub_accordion_224" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_224_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=114" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (114, 7), end pos: (116, 5)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -111,7 +111,7 @@ def cmd_embed(args: argparse.Namespace) -&gt; int: key = _resolve_key(args) secret = _resolve_secret(args) - if not is_watermarking_applicable( + if not not is_watermarking_applicable( method=args.method, pdf=args.input, position=args.position ): print(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105832641787Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105833575990Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_225"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_225_1" aria-expanded="false" aria-controls="job_list___sub_collapse_225_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_225_1"><button class="btn btn-outline-danger"><span class="job_id">225 : Job ID 980c300ad712474ea4f452c40614e54f</span></button></div></a><div aria-labelledby="job_list___sub_heading_225_1" data-parent="#job_list___sub_accordion_225" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_225_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=140" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (140, 7), end pos: (140, 15)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -137,7 +137,7 @@ def cmd_extract(args: argparse.Namespace) -&gt; int: key = _resolve_key(args) secret = read_watermark(method=args.method, pdf=args.input, key=key) - if args.out: + if not args.out: with open(args.out, "w", encoding="utf-8") as fh: fh.write(secret) print(f"Wrote secret -&gt; {args.out}")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_226"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_226_1" aria-expanded="false" aria-controls="job_list___sub_collapse_226_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_226_1"><button class="btn btn-outline-danger"><span class="job_id">226 : Job ID 4d86bef7995e423a975cbdf50e5a5449</span></button></div></a><div aria-labelledby="job_list___sub_heading_226_1" data-parent="#job_list___sub_accordion_226" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_226_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=231" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (231, 43), end pos: (231, 59)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -228,7 +228,7 @@ def main(argv: Iterable[str] | None = None) -&gt; int: parser = build_parser() - args = parser.parse_args(list(argv) if argv is not None else None) + args = parser.parse_args(list(argv) if not argv is not None else None) try: return int(args.func(args))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_227"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_227_1" aria-expanded="false" aria-controls="job_list___sub_collapse_227_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_227_1"><button class="btn btn-outline-danger"><span class="job_id">227 : Job ID a5f90c9fa41f4d58bc0463f0590555da</span></button></div></a><div aria-labelledby="job_list___sub_heading_227_1" data-parent="#job_list___sub_accordion_227" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_227_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (252, 3), end pos: (252, 25)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -249,6 +249,6 @@ return 5 -if __name__ == "__main__": +if not __name__ == "__main__": raise SystemExit(main()) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_228"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_228_1" aria-expanded="false" aria-controls="job_list___sub_collapse_228_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_228_1"><button class="btn btn-outline-danger"><span class="job_id">228 : Job ID e564cd7e0f4b41d4a253ac11874bb10f</span></button></div></a><div aria-labelledby="job_list___sub_heading_228_1" data-parent="#job_list___sub_accordion_228" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_228_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=160" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (160, 48), end pos: (160, 52)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -157,7 +157,7 @@ ) p.add_argument("--version", action="version", version=f"pdfwm {__version__}") - sub = p.add_subparsers(dest="cmd", required=True) + sub = p.add_subparsers(dest="cmd", required=False) # methods p_methods = sub.add_parser("methods", help="List available watermarking methods")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_229"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_229_1" aria-expanded="false" aria-controls="job_list___sub_collapse_229_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_229_1"><button class="btn btn-outline-danger"><span class="job_id">229 : Job ID 3b4937dfddc84336b8c4fa55a03ca4ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_229_1" data-parent="#job_list___sub_accordion_229" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_229_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=104" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (104, 55), end pos: (104, 60)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -101,7 +101,7 @@ tree = explore_pdf(args.input) if args.out: with open(args.out, "w", encoding="utf-8") as fh: - json.dump(tree, fh, indent=2, ensure_ascii=False) + json.dump(tree, fh, indent=2, ensure_ascii=True) else: json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) print()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_230"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_230_1" aria-expanded="false" aria-controls="job_list___sub_collapse_230_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_230_1"><button class="btn btn-outline-danger"><span class="job_id">230 : Job ID 6397ce1a51594ec7b671dfd9477708e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_230_1" data-parent="#job_list___sub_accordion_230" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_230_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=106" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (106, 59), end pos: (106, 64)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -103,7 +103,7 @@ with open(args.out, "w", encoding="utf-8") as fh: json.dump(tree, fh, indent=2, ensure_ascii=False) else: - json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) + json.dump(tree, sys.stdout, indent=2, ensure_ascii=True) print() return 0 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_231"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_231_1" aria-expanded="false" aria-controls="job_list___sub_collapse_231_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_231_1"><button class="btn btn-outline-success"><span class="job_id">231 : Job ID 5a5aa886513b4fa7b60e188e0feacccd</span></button></div></a><div aria-labelledby="job_list___sub_heading_231_1" data-parent="#job_list___sub_accordion_231" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_231_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=235" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (235, 11), end pos: (235, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -232,7 +232,7 @@ try: return int(args.func(args)) - except FileNotFoundError as e: + except CosmicRayTestingException as e: print(f"error: {e}", file=sys.stderr) return 2 except ValueError as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144123770928Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144124641058Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_232"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_232_1" aria-expanded="false" aria-controls="job_list___sub_collapse_232_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_232_1"><button class="btn btn-outline-danger"><span class="job_id">232 : Job ID ba04b8bec2fe4632b702292982e82c4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_232_1" data-parent="#job_list___sub_accordion_232" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_232_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=238" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (238, 11), end pos: (238, 21)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -235,7 +235,7 @@ except FileNotFoundError as e: print(f"error: {e}", file=sys.stderr) return 2 - except ValueError as e: + except CosmicRayTestingException as e: print(f"error: {e}", file=sys.stderr) return 2 except SecretNotFoundError as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_233"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_233_1" aria-expanded="false" aria-controls="job_list___sub_collapse_233_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_233_1"><button class="btn btn-outline-danger"><span class="job_id">233 : Job ID af9dbeae67c347b5bbee367c8ae019c9</span></button></div></a><div aria-labelledby="job_list___sub_heading_233_1" data-parent="#job_list___sub_accordion_233" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_233_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=241" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (241, 11), end pos: (241, 30)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -238,7 +238,7 @@ except ValueError as e: print(f"error: {e}", file=sys.stderr) return 2 - except SecretNotFoundError as e: + except CosmicRayTestingException as e: print(f"secret not found: {e}", file=sys.stderr) return 3 except InvalidKeyError as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_234"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_234_1" aria-expanded="false" aria-controls="job_list___sub_collapse_234_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_234_1"><button class="btn btn-outline-danger"><span class="job_id">234 : Job ID 7f6e15af60d84f7e911ba5b79c9249aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_234_1" data-parent="#job_list___sub_accordion_234" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_234_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=244" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (244, 11), end pos: (244, 26)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -241,7 +241,7 @@ except SecretNotFoundError as e: print(f"secret not found: {e}", file=sys.stderr) return 3 - except InvalidKeyError as e: + except CosmicRayTestingException as e: print(f"invalid key: {e}", file=sys.stderr) return 4 except WatermarkingError as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_235"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_235_1" aria-expanded="false" aria-controls="job_list___sub_collapse_235_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_235_1"><button class="btn btn-outline-danger"><span class="job_id">235 : Job ID d8eb21a96e7143228382583e1a7e1e07</span></button></div></a><div aria-labelledby="job_list___sub_heading_235_1" data-parent="#job_list___sub_accordion_235" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_235_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=247" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (247, 11), end pos: (247, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -244,7 +244,7 @@ except InvalidKeyError as e: print(f"invalid key: {e}", file=sys.stderr) return 4 - except WatermarkingError as e: + except CosmicRayTestingException as e: print(f"watermarking error: {e}", file=sys.stderr) return 5 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_236"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_236_1" aria-expanded="false" aria-controls="job_list___sub_collapse_236_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_236_1"><button class="btn btn-outline-danger"><span class="job_id">236 : Job ID 5f51741e1e3d4b17b3b0b63103038ea7</span></button></div></a><div aria-labelledby="job_list___sub_heading_236_1" data-parent="#job_list___sub_accordion_236" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_236_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (97, 11), end pos: (97, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -94,7 +94,7 @@ def cmd_methods(_args: argparse.Namespace) -&gt; int: for name in sorted(METHODS): print(name) - return 0 + return 1 def cmd_explore(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_237"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_237_1" aria-expanded="false" aria-controls="job_list___sub_collapse_237_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_237_1"><button class="btn btn-outline-danger"><span class="job_id">237 : Job ID 82446aaebca34711b9a36b71bf9bb78a</span></button></div></a><div aria-labelledby="job_list___sub_heading_237_1" data-parent="#job_list___sub_accordion_237" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_237_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (97, 11), end pos: (97, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -94,7 +94,7 @@ def cmd_methods(_args: argparse.Namespace) -&gt; int: for name in sorted(METHODS): print(name) - return 0 + return -1 def cmd_explore(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_238"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_238_1" aria-expanded="false" aria-controls="job_list___sub_collapse_238_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_238_1"><button class="btn btn-outline-danger"><span class="job_id">238 : Job ID 7c43a054d2c045c29e108b9c7053d146</span></button></div></a><div aria-labelledby="job_list___sub_heading_238_1" data-parent="#job_list___sub_accordion_238" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_238_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=104" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (104, 39), end pos: (104, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -101,7 +101,7 @@ tree = explore_pdf(args.input) if args.out: with open(args.out, "w", encoding="utf-8") as fh: - json.dump(tree, fh, indent=2, ensure_ascii=False) + json.dump(tree, fh, indent= 3, ensure_ascii=False) else: json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) print()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_239"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_239_1" aria-expanded="false" aria-controls="job_list___sub_collapse_239_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_239_1"><button class="btn btn-outline-danger"><span class="job_id">239 : Job ID 51e724e7ca47479287a542bec1d73578</span></button></div></a><div aria-labelledby="job_list___sub_heading_239_1" data-parent="#job_list___sub_accordion_239" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_239_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=104" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (104, 39), end pos: (104, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -101,7 +101,7 @@ tree = explore_pdf(args.input) if args.out: with open(args.out, "w", encoding="utf-8") as fh: - json.dump(tree, fh, indent=2, ensure_ascii=False) + json.dump(tree, fh, indent= 1, ensure_ascii=False) else: json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) print()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_240"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_240_1" aria-expanded="false" aria-controls="job_list___sub_collapse_240_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_240_1"><button class="btn btn-outline-danger"><span class="job_id">240 : Job ID 27c3d6ffe08c44be867e119297edf54d</span></button></div></a><div aria-labelledby="job_list___sub_heading_240_1" data-parent="#job_list___sub_accordion_240" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_240_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=106" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (106, 43), end pos: (106, 44)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -103,7 +103,7 @@ with open(args.out, "w", encoding="utf-8") as fh: json.dump(tree, fh, indent=2, ensure_ascii=False) else: - json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) + json.dump(tree, sys.stdout, indent= 3, ensure_ascii=False) print() return 0 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_241"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_241_1" aria-expanded="false" aria-controls="job_list___sub_collapse_241_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_241_1"><button class="btn btn-outline-danger"><span class="job_id">241 : Job ID c90d9f5da4634a86bd9a6b95e5259f7d</span></button></div></a><div aria-labelledby="job_list___sub_heading_241_1" data-parent="#job_list___sub_accordion_241" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_241_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=106" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (106, 43), end pos: (106, 44)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -103,7 +103,7 @@ with open(args.out, "w", encoding="utf-8") as fh: json.dump(tree, fh, indent=2, ensure_ascii=False) else: - json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) + json.dump(tree, sys.stdout, indent= 1, ensure_ascii=False) print() return 0 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_242"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_242_1" aria-expanded="false" aria-controls="job_list___sub_collapse_242_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_242_1"><button class="btn btn-outline-danger"><span class="job_id">242 : Job ID 502c8cbfe9b94acf8168b771e115db46</span></button></div></a><div aria-labelledby="job_list___sub_heading_242_1" data-parent="#job_list___sub_accordion_242" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_242_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=108" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (108, 11), end pos: (108, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -105,7 +105,7 @@ else: json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) print() - return 0 + return 1 def cmd_embed(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_243"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_243_1" aria-expanded="false" aria-controls="job_list___sub_collapse_243_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_243_1"><button class="btn btn-outline-danger"><span class="job_id">243 : Job ID 3627c9683b624c1a998da8bf06fcaae2</span></button></div></a><div aria-labelledby="job_list___sub_heading_243_1" data-parent="#job_list___sub_accordion_243" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_243_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=108" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (108, 11), end pos: (108, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -105,7 +105,7 @@ else: json.dump(tree, sys.stdout, indent=2, ensure_ascii=False) print() - return 0 + return -1 def cmd_embed(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_244"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_244_1" aria-expanded="false" aria-controls="job_list___sub_collapse_244_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_244_1"><button class="btn btn-outline-danger"><span class="job_id">244 : Job ID ba9b1a927875443a8257f7d3100c7056</span></button></div></a><div aria-labelledby="job_list___sub_heading_244_1" data-parent="#job_list___sub_accordion_244" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_244_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=121" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (121, 15), end pos: (121, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -118,7 +118,7 @@ f"Method {args.method} is not applicable on {args.output} at " f"{args.position}." ) - return 5 + return 6 pdf_bytes = apply_watermark( method=args.method,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_245"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_245_1" aria-expanded="false" aria-controls="job_list___sub_collapse_245_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_245_1"><button class="btn btn-outline-danger"><span class="job_id">245 : Job ID 2abd2b4bf50c4bd481e6c0503beb5fb5</span></button></div></a><div aria-labelledby="job_list___sub_heading_245_1" data-parent="#job_list___sub_accordion_245" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_245_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=121" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (121, 15), end pos: (121, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -118,7 +118,7 @@ f"Method {args.method} is not applicable on {args.output} at " f"{args.position}." ) - return 5 + return 4 pdf_bytes = apply_watermark( method=args.method,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_246"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_246_1" aria-expanded="false" aria-controls="job_list___sub_collapse_246_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_246_1"><button class="btn btn-outline-danger"><span class="job_id">246 : Job ID bbb9aba0515d49a5b63665b7bf0a055d</span></button></div></a><div aria-labelledby="job_list___sub_heading_246_1" data-parent="#job_list___sub_accordion_246" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_246_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=134" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (134, 11), end pos: (134, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -131,7 +131,7 @@ with open(args.output, "wb") as fh: fh.write(pdf_bytes) print(f"Wrote watermarked PDF -&gt; {args.output}") - return 0 + return 1 def cmd_extract(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_247"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_247_1" aria-expanded="false" aria-controls="job_list___sub_collapse_247_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_247_1"><button class="btn btn-outline-danger"><span class="job_id">247 : Job ID fdaa185d69474d9fb5d7ab6ffc6daebb</span></button></div></a><div aria-labelledby="job_list___sub_heading_247_1" data-parent="#job_list___sub_accordion_247" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_247_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=134" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (134, 11), end pos: (134, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -131,7 +131,7 @@ with open(args.output, "wb") as fh: fh.write(pdf_bytes) print(f"Wrote watermarked PDF -&gt; {args.output}") - return 0 + return -1 def cmd_extract(args: argparse.Namespace) -&gt; int:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_248"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_248_1" aria-expanded="false" aria-controls="job_list___sub_collapse_248_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_248_1"><button class="btn btn-outline-danger"><span class="job_id">248 : Job ID 386bfe20ab154d8a8cdbef447463f076</span></button></div></a><div aria-labelledby="job_list___sub_heading_248_1" data-parent="#job_list___sub_accordion_248" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_248_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=146" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (146, 11), end pos: (146, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -143,7 +143,7 @@ print(f"Wrote secret -&gt; {args.out}") else: print(secret) - return 0 + return 1 # --------------------</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_249"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_249_1" aria-expanded="false" aria-controls="job_list___sub_collapse_249_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_249_1"><button class="btn btn-outline-danger"><span class="job_id">249 : Job ID a9d5fae5c1cc43649adbf465c3852166</span></button></div></a><div aria-labelledby="job_list___sub_heading_249_1" data-parent="#job_list___sub_accordion_249" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_249_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=146" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (146, 11), end pos: (146, 12)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -143,7 +143,7 @@ print(f"Wrote secret -&gt; {args.out}") else: print(secret) - return 0 + return -1 # --------------------</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_250"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_250_1" aria-expanded="false" aria-controls="job_list___sub_collapse_250_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_250_1"><button class="btn btn-outline-danger"><span class="job_id">250 : Job ID b53c0a3fab244b48b451f26106a3d7b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_250_1" data-parent="#job_list___sub_accordion_250" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_250_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (237, 15), end pos: (237, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -234,7 +234,7 @@ return int(args.func(args)) except FileNotFoundError as e: print(f"error: {e}", file=sys.stderr) - return 2 + return 3 except ValueError as e: print(f"error: {e}", file=sys.stderr) return 2</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_251"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_251_1" aria-expanded="false" aria-controls="job_list___sub_collapse_251_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_251_1"><button class="btn btn-outline-danger"><span class="job_id">251 : Job ID 9f9d4924aee84576a57a739f1edf48cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_251_1" data-parent="#job_list___sub_accordion_251" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_251_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (237, 15), end pos: (237, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -234,7 +234,7 @@ return int(args.func(args)) except FileNotFoundError as e: print(f"error: {e}", file=sys.stderr) - return 2 + return 1 except ValueError as e: print(f"error: {e}", file=sys.stderr) return 2</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_252"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_252_1" aria-expanded="false" aria-controls="job_list___sub_collapse_252_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_252_1"><button class="btn btn-outline-danger"><span class="job_id">252 : Job ID d02b7e7846924e91837613af16ff3ae3</span></button></div></a><div aria-labelledby="job_list___sub_heading_252_1" data-parent="#job_list___sub_accordion_252" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_252_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=240" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (240, 15), end pos: (240, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -237,7 +237,7 @@ return 2 except ValueError as e: print(f"error: {e}", file=sys.stderr) - return 2 + return 3 except SecretNotFoundError as e: print(f"secret not found: {e}", file=sys.stderr) return 3</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_253"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_253_1" aria-expanded="false" aria-controls="job_list___sub_collapse_253_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_253_1"><button class="btn btn-outline-danger"><span class="job_id">253 : Job ID f0c1f2cab855426a8c1a8fe2242e5b7d</span></button></div></a><div aria-labelledby="job_list___sub_heading_253_1" data-parent="#job_list___sub_accordion_253" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_253_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=240" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (240, 15), end pos: (240, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -237,7 +237,7 @@ return 2 except ValueError as e: print(f"error: {e}", file=sys.stderr) - return 2 + return 1 except SecretNotFoundError as e: print(f"secret not found: {e}", file=sys.stderr) return 3</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_254"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_254_1" aria-expanded="false" aria-controls="job_list___sub_collapse_254_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_254_1"><button class="btn btn-outline-success"><span class="job_id">254 : Job ID 976a798ae4d340b0889b6ce31246e73f</span></button></div></a><div aria-labelledby="job_list___sub_heading_254_1" data-parent="#job_list___sub_accordion_254" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_254_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=243" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (243, 15), end pos: (243, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -240,7 +240,7 @@ return 2 except SecretNotFoundError as e: print(f"secret not found: {e}", file=sys.stderr) - return 3 + return 4 except InvalidKeyError as e: print(f"invalid key: {e}", file=sys.stderr) return 4</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T162650001088Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T162650921214Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_255"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_255_1" aria-expanded="false" aria-controls="job_list___sub_collapse_255_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_255_1"><button class="btn btn-outline-danger"><span class="job_id">255 : Job ID 249c6e259b3f42ebafada321272bb972</span></button></div></a><div aria-labelledby="job_list___sub_heading_255_1" data-parent="#job_list___sub_accordion_255" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_255_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=243" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (243, 15), end pos: (243, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -240,7 +240,7 @@ return 2 except SecretNotFoundError as e: print(f"secret not found: {e}", file=sys.stderr) - return 3 + return 2 except InvalidKeyError as e: print(f"invalid key: {e}", file=sys.stderr) return 4</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_256"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_256_1" aria-expanded="false" aria-controls="job_list___sub_collapse_256_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_256_1"><button class="btn btn-outline-danger"><span class="job_id">256 : Job ID 58ddd6da55464fcca095a45a1f4b4c8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_256_1" data-parent="#job_list___sub_accordion_256" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_256_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=246" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (246, 15), end pos: (246, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -243,7 +243,7 @@ return 3 except InvalidKeyError as e: print(f"invalid key: {e}", file=sys.stderr) - return 4 + return 5 except WatermarkingError as e: print(f"watermarking error: {e}", file=sys.stderr) return 5</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_257"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_257_1" aria-expanded="false" aria-controls="job_list___sub_collapse_257_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_257_1"><button class="btn btn-outline-danger"><span class="job_id">257 : Job ID 20bb3917159f4baa884a9e1e26f8f602</span></button></div></a><div aria-labelledby="job_list___sub_heading_257_1" data-parent="#job_list___sub_accordion_257" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_257_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=246" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (246, 15), end pos: (246, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -243,7 +243,7 @@ return 3 except InvalidKeyError as e: print(f"invalid key: {e}", file=sys.stderr) - return 4 + return 3 except WatermarkingError as e: print(f"watermarking error: {e}", file=sys.stderr) return 5</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_258"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_258_1" aria-expanded="false" aria-controls="job_list___sub_collapse_258_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_258_1"><button class="btn btn-outline-success"><span class="job_id">258 : Job ID d53a6b2a829a4e8b9be3bbf593f4d2d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_258_1" data-parent="#job_list___sub_accordion_258" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_258_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=249" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (249, 15), end pos: (249, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -246,7 +246,7 @@ return 4 except WatermarkingError as e: print(f"watermarking error: {e}", file=sys.stderr) - return 5 + return 6 if __name__ == "__main__":</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143102456024Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143103261441Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_259"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_259_1" aria-expanded="false" aria-controls="job_list___sub_collapse_259_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_259_1"><button class="btn btn-outline-danger"><span class="job_id">259 : Job ID cdd30d44b92642e1b0e521a49f21d82f</span></button></div></a><div aria-labelledby="job_list___sub_heading_259_1" data-parent="#job_list___sub_accordion_259" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_259_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=249" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (249, 15), end pos: (249, 16)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -246,7 +246,7 @@ return 4 except WatermarkingError as e: print(f"watermarking error: {e}", file=sys.stderr) - return 5 + return 4 if __name__ == "__main__":</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_260"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_260_1" aria-expanded="false" aria-controls="job_list___sub_collapse_260_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_260_1"><button class="btn btn-outline-danger"><span class="job_id">260 : Job ID 7fb0e8064db6458fbb6d5ece18253597</span></button></div></a><div aria-labelledby="job_list___sub_heading_260_1" data-parent="#job_list___sub_accordion_260" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_260_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_cli.py&amp;line=95" class="text-secondary"><button class="btn btn-outline-dark">watermarking_cli.py, start pos: (95, 16), end pos: (95, 31)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_cli.py +++ bwatermarking_cli.py @@ -92,7 +92,7 @@ def cmd_methods(_args: argparse.Namespace) -&gt; int: - for name in sorted(METHODS): + for name in []: print(name) return 0 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_261"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_261_1" aria-expanded="false" aria-controls="job_list___sub_collapse_261_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_261_1"><button class="btn btn-outline-success"><span class="job_id">261 : Job ID bb8f3cb48b434978bb070e023f3167a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_261_1" data-parent="#job_list___sub_accordion_261" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_261_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes + bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for +: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E92F8175C0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001E92E749400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E92F817B30&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001E92E749400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1471/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E92F841A30&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E92F841400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp541yo1f0.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp541yo1f0.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E92F840EF0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E92F841AF0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E92F841E20&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes + bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 20.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_262"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_262_1" aria-expanded="false" aria-controls="job_list___sub_collapse_262_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_262_1"><button class="btn btn-outline-success"><span class="job_id">262 : Job ID edfe0b3ca8054deabbba66d0c453f92e</span></button></div></a><div aria-labelledby="job_list___sub_heading_262_1" data-parent="#job_list___sub_accordion_262" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_262_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str + os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for +: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024828DFB380&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024827DBAB40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str + os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024828DFB8F0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024827DBAB40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-737/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str + os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024828E211C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpwz5sbw20.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpwz5sbw20.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str + os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_263"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_263_1" aria-expanded="false" aria-controls="job_list___sub_collapse_263_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_263_1"><button class="btn btn-outline-danger"><span class="job_id">263 : Job ID 5824462a6cea418f8e48f20002076a2a</span></button></div></a><div aria-labelledby="job_list___sub_heading_263_1" data-parent="#job_list___sub_accordion_263" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_263_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str + None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_264"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_264_1" aria-expanded="false" aria-controls="job_list___sub_collapse_264_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_264_1"><button class="btn btn-outline-danger"><span class="job_id">264 : Job ID 5879d4ab41ac441aa7ff6305f5721da5</span></button></div></a><div aria-labelledby="job_list___sub_heading_264_1" data-parent="#job_list___sub_accordion_264" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_264_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str + None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_265"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_265_1" aria-expanded="false" aria-controls="job_list___sub_collapse_265_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_265_1"><button class="btn btn-outline-danger"><span class="job_id">265 : Job ID 6434834916cc42a1a52993d26f148464</span></button></div></a><div aria-labelledby="job_list___sub_heading_265_1" data-parent="#job_list___sub_accordion_265" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_265_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str + None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_266"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_266_1" aria-expanded="false" aria-controls="job_list___sub_collapse_266_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_266_1"><button class="btn btn-outline-success"><span class="job_id">266 : Job ID 63d2526a0a4543638e2daf764feed02b</span></button></div></a><div aria-labelledby="job_list___sub_heading_266_1" data-parent="#job_list___sub_accordion_266" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_266_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes - bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for -: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029A73557680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000029A7247D370&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029A73557BF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000029A7247D370&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-206/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A73581AC0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A73581490&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_ohprknt.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_ohprknt.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A73580F80&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A73581B80&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A73581EB0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes - bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_267"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_267_1" aria-expanded="false" aria-controls="job_list___sub_collapse_267_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_267_1"><button class="btn btn-outline-success"><span class="job_id">267 : Job ID 62fade39f12241ba9a93b3e11be070eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_267_1" data-parent="#job_list___sub_accordion_267" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_267_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str - os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for -: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F2EE7A7830&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F2EBC53B30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str - os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F2EE7A7DA0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F2EBC53B30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1501/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str - os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F2EE7CD6A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp71cayi2u.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp71cayi2u.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str - os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_268"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_268_1" aria-expanded="false" aria-controls="job_list___sub_collapse_268_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_268_1"><button class="btn btn-outline-danger"><span class="job_id">268 : Job ID 9afd487ddb7f43e8a4d1b7a2a28ec024</span></button></div></a><div aria-labelledby="job_list___sub_heading_268_1" data-parent="#job_list___sub_accordion_268" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_268_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str - None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_269"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_269_1" aria-expanded="false" aria-controls="job_list___sub_collapse_269_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_269_1"><button class="btn btn-outline-danger"><span class="job_id">269 : Job ID ff899f7f49b14467a1af5adedf579322</span></button></div></a><div aria-labelledby="job_list___sub_heading_269_1" data-parent="#job_list___sub_accordion_269" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_269_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str - None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_270"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_270_1" aria-expanded="false" aria-controls="job_list___sub_collapse_270_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_270_1"><button class="btn btn-outline-danger"><span class="job_id">270 : Job ID 947f6cb259c04f228d23a9e71c34f586</span></button></div></a><div aria-labelledby="job_list___sub_heading_270_1" data-parent="#job_list___sub_accordion_270" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_270_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str - None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_271"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_271_1" aria-expanded="false" aria-controls="job_list___sub_collapse_271_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_271_1"><button class="btn btn-outline-success"><span class="job_id">271 : Job ID 91fef5c468514171aefc99ab336cd482</span></button></div></a><div aria-labelledby="job_list___sub_heading_271_1" data-parent="#job_list___sub_accordion_271" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_271_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes * bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for *: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F35006B560&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F34F080050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F35006BAD0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F34F080050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1889/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F3500919D0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F3500913A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpw94wcoa8.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpw94wcoa8.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F350090E90&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F350091A90&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F350091DC0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes * bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_272"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_272_1" aria-expanded="false" aria-controls="job_list___sub_collapse_272_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_272_1"><button class="btn btn-outline-success"><span class="job_id">272 : Job ID 48e03777838d48dfae5427c47c6df080</span></button></div></a><div aria-labelledby="job_list___sub_heading_272_1" data-parent="#job_list___sub_accordion_272" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_272_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str * os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for *: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BFA8AAB680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BFA66A0E60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str * os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BFA8AABBF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BFA66A0E60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1243/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str * os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001BFA8AD1460&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmphanaev60.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmphanaev60.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str * os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_273"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_273_1" aria-expanded="false" aria-controls="job_list___sub_collapse_273_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_273_1"><button class="btn btn-outline-danger"><span class="job_id">273 : Job ID c373268a786c4d26a51ade866741b479</span></button></div></a><div aria-labelledby="job_list___sub_heading_273_1" data-parent="#job_list___sub_accordion_273" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_273_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str * None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_274"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_274_1" aria-expanded="false" aria-controls="job_list___sub_collapse_274_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_274_1"><button class="btn btn-outline-danger"><span class="job_id">274 : Job ID 2ce47c5427b5417aac23955295a77540</span></button></div></a><div aria-labelledby="job_list___sub_heading_274_1" data-parent="#job_list___sub_accordion_274" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_274_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str * None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_275"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_275_1" aria-expanded="false" aria-controls="job_list___sub_collapse_275_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_275_1"><button class="btn btn-outline-danger"><span class="job_id">275 : Job ID 8d89ef1906d4465d94480f1007418fad</span></button></div></a><div aria-labelledby="job_list___sub_heading_275_1" data-parent="#job_list___sub_accordion_275" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_275_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str * None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_276"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_276_1" aria-expanded="false" aria-controls="job_list___sub_collapse_276_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_276_1"><button class="btn btn-outline-success"><span class="job_id">276 : Job ID 21b6e2d6d45244a481d8fbfd0d719d36</span></button></div></a><div aria-labelledby="job_list___sub_heading_276_1" data-parent="#job_list___sub_accordion_276" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_276_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes / bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for /: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C206F47710&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C20304D6D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C206F47C80&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C20304D6D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1458/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C206F6DBB0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C206F6D580&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkvmxhl7s.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkvmxhl7s.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C206F6D070&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C206F6DC70&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C206F6DFA0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes / bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_277"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_277_1" aria-expanded="false" aria-controls="job_list___sub_collapse_277_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_277_1"><button class="btn btn-outline-success"><span class="job_id">277 : Job ID af73e4453dd6481185106a9168ff3082</span></button></div></a><div aria-labelledby="job_list___sub_heading_277_1" data-parent="#job_list___sub_accordion_277" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_277_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str / os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for /: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000283F05B7770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000283EF4E93D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str / os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000283F05B7CE0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000283EF4E93D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1693/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str / os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000283F05DD580&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpaxn6cvlb.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpaxn6cvlb.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str / os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 20.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_278"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_278_1" aria-expanded="false" aria-controls="job_list___sub_collapse_278_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_278_1"><button class="btn btn-outline-danger"><span class="job_id">278 : Job ID d083f397174348938942cce9346d6129</span></button></div></a><div aria-labelledby="job_list___sub_heading_278_1" data-parent="#job_list___sub_accordion_278" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_278_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str / None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_279"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_279_1" aria-expanded="false" aria-controls="job_list___sub_collapse_279_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_279_1"><button class="btn btn-outline-danger"><span class="job_id">279 : Job ID aee0fbf1abf94f379258d36490d80b74</span></button></div></a><div aria-labelledby="job_list___sub_heading_279_1" data-parent="#job_list___sub_accordion_279" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_279_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str / None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_280"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_280_1" aria-expanded="false" aria-controls="job_list___sub_collapse_280_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_280_1"><button class="btn btn-outline-danger"><span class="job_id">280 : Job ID 7b4f2ac307c9423d9032291c8beb64f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_280_1" data-parent="#job_list___sub_accordion_280" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_280_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str / None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_281"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_281_1" aria-expanded="false" aria-controls="job_list___sub_collapse_281_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_281_1"><button class="btn btn-outline-success"><span class="job_id">281 : Job ID c34f753db47a495fb1058684b8adff46</span></button></div></a><div aria-labelledby="job_list___sub_heading_281_1" data-parent="#job_list___sub_accordion_281" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_281_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes // bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for //: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022E098D76E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022E088094F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022E098D7C50&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022E088094F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-929/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022E09901B50&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022E09901520&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmph08c2gag.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmph08c2gag.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022E09901010&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022E09901C10&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022E09901F40&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes // bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_282"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_282_1" aria-expanded="false" aria-controls="job_list___sub_collapse_282_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_282_1"><button class="btn btn-outline-success"><span class="job_id">282 : Job ID 276231eba08644588b47f98d636496bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_282_1" data-parent="#job_list___sub_accordion_282" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_282_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str // os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for //: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000023DEF507770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023DEE4493A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str // os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000023DEF507CE0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023DEE4493A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2054/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str // os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000023DEF52D610&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpphy6h2d6.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpphy6h2d6.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str // os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_283"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_283_1" aria-expanded="false" aria-controls="job_list___sub_collapse_283_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_283_1"><button class="btn btn-outline-danger"><span class="job_id">283 : Job ID 3ae0a1673d654a9293bd1c3bbb3463cc</span></button></div></a><div aria-labelledby="job_list___sub_heading_283_1" data-parent="#job_list___sub_accordion_283" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_283_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str // None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_284"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_284_1" aria-expanded="false" aria-controls="job_list___sub_collapse_284_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_284_1"><button class="btn btn-outline-danger"><span class="job_id">284 : Job ID 341d82789efc484483f623cb6b629e32</span></button></div></a><div aria-labelledby="job_list___sub_heading_284_1" data-parent="#job_list___sub_accordion_284" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_284_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str // None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_285"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_285_1" aria-expanded="false" aria-controls="job_list___sub_collapse_285_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_285_1"><button class="btn btn-outline-success"><span class="job_id">285 : Job ID 33a9b5634d53422fb0263796278170b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_285_1" data-parent="#job_list___sub_accordion_285" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_285_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str // None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150857571035Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150858390812Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_286"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_286_1" aria-expanded="false" aria-controls="job_list___sub_collapse_286_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_286_1"><button class="btn btn-outline-success"><span class="job_id">286 : Job ID 9ec1c3e2493f42faa8b7767df84a0622</span></button></div></a><div aria-labelledby="job_list___sub_heading_286_1" data-parent="#job_list___sub_accordion_286" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_286_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes % bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215014097769Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215015016033Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024EBB40B5C0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024EBA36AC00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024EBB40BB30&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024EBA36AC00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2008/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024EBB431A60&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024EBB431430&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpet6kz4ep.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpet6kz4ep.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024EBB430F20&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024EBB431B20&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000024EBB431E50&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes % bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 17 failed, 19 passed, 6 skipped, 23 warnings in 19.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_287"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_287_1" aria-expanded="false" aria-controls="job_list___sub_collapse_287_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_287_1"><button class="btn btn-outline-success"><span class="job_id">287 : Job ID 51112b94c15d4e44af1858fa78300b72</span></button></div></a><div aria-labelledby="job_list___sub_heading_287_1" data-parent="#job_list___sub_accordion_287" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_287_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str % os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for %: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CFBCC2B6B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFBBB5D220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str % os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CFBCC2BC20&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFBBB5D220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1279/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str % os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001CFBCC51550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpf6b3bfsl.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpf6b3bfsl.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str % os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_288"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_288_1" aria-expanded="false" aria-controls="job_list___sub_collapse_288_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_288_1"><button class="btn btn-outline-danger"><span class="job_id">288 : Job ID 787086044d4a4e588ed2b12c70933a53</span></button></div></a><div aria-labelledby="job_list___sub_heading_288_1" data-parent="#job_list___sub_accordion_288" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_288_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str % None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_289"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_289_1" aria-expanded="false" aria-controls="job_list___sub_collapse_289_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_289_1"><button class="btn btn-outline-danger"><span class="job_id">289 : Job ID b117142be0364eacad4418ac555ca25a</span></button></div></a><div aria-labelledby="job_list___sub_heading_289_1" data-parent="#job_list___sub_accordion_289" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_289_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str % None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_290"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_290_1" aria-expanded="false" aria-controls="job_list___sub_collapse_290_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_290_1"><button class="btn btn-outline-danger"><span class="job_id">290 : Job ID 4d6d0a0c4ebc4a40a6da2b23b7457a54</span></button></div></a><div aria-labelledby="job_list___sub_heading_290_1" data-parent="#job_list___sub_accordion_290" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_290_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str % None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_291"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_291_1" aria-expanded="false" aria-controls="job_list___sub_collapse_291_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_291_1"><button class="btn btn-outline-success"><span class="job_id">291 : Job ID 5087a7a3227744eea72e1f0d8410f835</span></button></div></a><div aria-labelledby="job_list___sub_heading_291_1" data-parent="#job_list___sub_accordion_291" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_291_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes ** bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for ** or pow(): 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000028F1B1E7800&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028F1A2104D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000028F1B1E7D70&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028F1A2104D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-781/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000028F1B20DBE0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000028F1B20D5B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpsh7vwpwq.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpsh7vwpwq.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000028F1B20D0A0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000028F1B20DCA0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000028F1B20DFD0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ** bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 20.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_292"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_292_1" aria-expanded="false" aria-controls="job_list___sub_collapse_292_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_292_1"><button class="btn btn-outline-success"><span class="job_id">292 : Job ID 986f287e9afb4a4cabfc23b874cffa2c</span></button></div></a><div aria-labelledby="job_list___sub_heading_292_1" data-parent="#job_list___sub_accordion_292" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_292_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str ** os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for ** or pow(): 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020F3F59B560&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000020F3D1E0500&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ** os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020F3F59BAD0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000020F3D1E0500&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-693/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ** os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020F3F5C1400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpz4tl279t.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpz4tl279t.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ** os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_293"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_293_1" aria-expanded="false" aria-controls="job_list___sub_collapse_293_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_293_1"><button class="btn btn-outline-danger"><span class="job_id">293 : Job ID 57d6662dc4f84835bc69300a000d6aca</span></button></div></a><div aria-labelledby="job_list___sub_heading_293_1" data-parent="#job_list___sub_accordion_293" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_293_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ** None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_294"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_294_1" aria-expanded="false" aria-controls="job_list___sub_collapse_294_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_294_1"><button class="btn btn-outline-danger"><span class="job_id">294 : Job ID 7dc6a4cf897b47e789afc56d1bbd1ac0</span></button></div></a><div aria-labelledby="job_list___sub_heading_294_1" data-parent="#job_list___sub_accordion_294" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_294_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ** None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_295"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_295_1" aria-expanded="false" aria-controls="job_list___sub_collapse_295_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_295_1"><button class="btn btn-outline-danger"><span class="job_id">295 : Job ID f53fa75ddb4a497baf719504b9c04ab7</span></button></div></a><div aria-labelledby="job_list___sub_heading_295_1" data-parent="#job_list___sub_accordion_295" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_295_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ** None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_296"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_296_1" aria-expanded="false" aria-controls="job_list___sub_collapse_296_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_296_1"><button class="btn btn-outline-success"><span class="job_id">296 : Job ID 79f83028bca7407ba6fdbcae89fd2a8d</span></button></div></a><div aria-labelledby="job_list___sub_heading_296_1" data-parent="#job_list___sub_accordion_296" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_296_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes &gt;&gt; bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002861F9F77A0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002861E939460&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002861F9F7D10&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002861E939460&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1699/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002861FA1DBE0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002861FA1D5B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmptv6jixqe.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmptv6jixqe.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002861FA1D0A0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002861FA1DCA0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002861FA1DFD0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &gt;&gt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_297"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_297_1" aria-expanded="false" aria-controls="job_list___sub_collapse_297_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_297_1"><button class="btn btn-outline-success"><span class="job_id">297 : Job ID a9bd84dcffd646e2b41628b7bfa993dd</span></button></div></a><div aria-labelledby="job_list___sub_heading_297_1" data-parent="#job_list___sub_accordion_297" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_297_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str &gt;&gt; os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for &gt;&gt;: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000184B74676B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000184B63CEC00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &gt;&gt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000184B7467C20&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000184B63CEC00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1964/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &gt;&gt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000184B7491550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp34_bprkb.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp34_bprkb.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &gt;&gt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_298"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_298_1" aria-expanded="false" aria-controls="job_list___sub_collapse_298_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_298_1"><button class="btn btn-outline-danger"><span class="job_id">298 : Job ID 99f4d69ac9504229b39e7f5fd9a37f5a</span></button></div></a><div aria-labelledby="job_list___sub_heading_298_1" data-parent="#job_list___sub_accordion_298" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_298_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &gt;&gt; None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_299"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_299_1" aria-expanded="false" aria-controls="job_list___sub_collapse_299_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_299_1"><button class="btn btn-outline-danger"><span class="job_id">299 : Job ID abd26780fbd84337b6d71108271826e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_299_1" data-parent="#job_list___sub_accordion_299" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_299_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_300"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_300_1" aria-expanded="false" aria-controls="job_list___sub_collapse_300_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_300_1"><button class="btn btn-outline-danger"><span class="job_id">300 : Job ID a05b0c2d32fa431c99304ecb8b2d51b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_300_1" data-parent="#job_list___sub_accordion_300" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_300_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_301"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_301_1" aria-expanded="false" aria-controls="job_list___sub_collapse_301_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_301_1"><button class="btn btn-outline-success"><span class="job_id">301 : Job ID 6f20a7909f094a3f85bf54b038841b43</span></button></div></a><div aria-labelledby="job_list___sub_heading_301_1" data-parent="#job_list___sub_accordion_301" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_301_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes &lt;&lt; bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150339793352Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150340701502Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002402B5F77A0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002402889F650&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002402B5F7D10&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002402889F650&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-901/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002402B61DC10&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002402B61D5E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmps9esmb_q.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmps9esmb_q.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002402B61D0D0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002402B61DCD0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002402B61E000&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &lt;&lt; bytearray): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 19 failed, 17 passed, 6 skipped, 23 warnings in 19.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_302"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_302_1" aria-expanded="false" aria-controls="job_list___sub_collapse_302_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_302_1"><button class="btn btn-outline-success"><span class="job_id">302 : Job ID 0c9fd7c9421f4034838f1ab3cd74eba3</span></button></div></a><div aria-labelledby="job_list___sub_heading_302_1" data-parent="#job_list___sub_accordion_302" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_302_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str &lt;&lt; os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for &lt;&lt;: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E6EE047740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001E6EB561340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &lt;&lt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E6EE047CB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001E6EB561340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1167/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &lt;&lt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E6EE06D550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp0xaoovxj.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp0xaoovxj.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &lt;&lt; os.PathLike): ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 19.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_303"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_303_1" aria-expanded="false" aria-controls="job_list___sub_collapse_303_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_303_1"><button class="btn btn-outline-danger"><span class="job_id">303 : Job ID 2789cfcb16cf4a62a8c47cebdb0114a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_303_1" data-parent="#job_list___sub_accordion_303" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_303_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &lt;&lt; None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_304"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_304_1" aria-expanded="false" aria-controls="job_list___sub_collapse_304_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_304_1"><button class="btn btn-outline-danger"><span class="job_id">304 : Job ID ae575e3a629249009e814c05b87342a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_304_1" data-parent="#job_list___sub_accordion_304" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_304_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_305"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_305_1" aria-expanded="false" aria-controls="job_list___sub_collapse_305_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_305_1"><button class="btn btn-outline-danger"><span class="job_id">305 : Job ID e948bb8e374748da9c87bb25dd93ea86</span></button></div></a><div aria-labelledby="job_list___sub_heading_305_1" data-parent="#job_list___sub_accordion_305" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_305_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_306"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_306_1" aria-expanded="false" aria-controls="job_list___sub_collapse_306_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_306_1"><button class="btn btn-outline-success"><span class="job_id">306 : Job ID 148c190336934fa39d2d5b30f996d33e</span></button></div></a><div aria-labelledby="job_list___sub_heading_306_1" data-parent="#job_list___sub_accordion_306" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_306_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes &amp; bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T160048948533Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T160049858000Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D89D307740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D89C22D280&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D89D307CB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D89C22D280&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1057/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D89D32DB80&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D89D32D550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpgcq3w1o3.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpgcq3w1o3.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D89D32D040&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D89D32DC40&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D89D32DF70&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes &amp; bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 17 failed, 19 passed, 6 skipped, 23 warnings in 19.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_307"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_307_1" aria-expanded="false" aria-controls="job_list___sub_collapse_307_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_307_1"><button class="btn btn-outline-success"><span class="job_id">307 : Job ID cd2db7f26b6242c7b38d3de6f2994f25</span></button></div></a><div aria-labelledby="job_list___sub_heading_307_1" data-parent="#job_list___sub_accordion_307" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_307_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str &amp; os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for &amp;: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F2BB2B7830&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F2BA1F95E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &amp; os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F2BB2B7DA0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001F2BA1F95E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-173/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &amp; os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F2BB2DD6D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkf1v1ffn.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkf1v1ffn.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str &amp; os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 20.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_308"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_308_1" aria-expanded="false" aria-controls="job_list___sub_collapse_308_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_308_1"><button class="btn btn-outline-danger"><span class="job_id">308 : Job ID 5a122bd34a9146379e6768ece5c64455</span></button></div></a><div aria-labelledby="job_list___sub_heading_308_1" data-parent="#job_list___sub_accordion_308" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_308_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &amp; None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_309"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_309_1" aria-expanded="false" aria-controls="job_list___sub_collapse_309_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_309_1"><button class="btn btn-outline-danger"><span class="job_id">309 : Job ID 1f2d3626e658458fa31c33f57fae53f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_309_1" data-parent="#job_list___sub_accordion_309" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_309_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_310"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_310_1" aria-expanded="false" aria-controls="job_list___sub_collapse_310_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_310_1"><button class="btn btn-outline-danger"><span class="job_id">310 : Job ID 8fec45a7924d4bee9a3f83e61150046e</span></button></div></a><div aria-labelledby="job_list___sub_heading_310_1" data-parent="#job_list___sub_accordion_310" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_310_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_311"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_311_1" aria-expanded="false" aria-controls="job_list___sub_collapse_311_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_311_1"><button class="btn btn-outline-success"><span class="job_id">311 : Job ID 6dcdd3728d82463dbbface4e9d1d13d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_311_1" data-parent="#job_list___sub_accordion_311" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_311_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 29), end pos: (98, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if isinstance(src, bytes ^ bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for ^: 'type' and 'type' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000204A17A7650&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000204A06DCEC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000204A17A7BC0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000204A06DCEC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2384/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000204A17D1A00&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000204A17D13D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmprog_kl0q.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmprog_kl0q.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000204A17D0EC0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000204A17D1AC0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000204A17D1DF0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ &gt; if isinstance(src, bytes ^ bytearray): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'type' watermarking_method.py:98: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 20.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_312"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_312_1" aria-expanded="false" aria-controls="job_list___sub_collapse_312_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_312_1"><button class="btn btn-outline-success"><span class="job_id">312 : Job ID 837d19f3c4264b62b7149effde8c6e7d</span></button></div></a><div aria-labelledby="job_list___sub_heading_312_1" data-parent="#job_list___sub_accordion_312" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_312_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (100, 29), end pos: (100, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -97,7 +97,7 @@ """ if isinstance(src, bytes | bytearray): data = bytes(src) - elif isinstance(src, str | os.PathLike): + elif isinstance(src, str ^ os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"):</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs...........F...... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: unsupported operand type(s) for ^: 'type' and 'ABCMeta' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000273A2197770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000273A151AC90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ^ os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000273A2197CE0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000273A151AC90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-766/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ^ os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000273A21BD5B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpopou6v_6.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpopou6v_6.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) &gt; elif isinstance(src, str ^ os.PathLike): ^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'ABCMeta' watermarking_method.py:100: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path 7 failed, 29 passed, 6 skipped, 23 warnings in 20.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_313"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_313_1" aria-expanded="false" aria-controls="job_list___sub_collapse_313_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_313_1"><button class="btn btn-outline-danger"><span class="job_id">313 : Job ID 6be1c876162f412ba8e98536f26bed58</span></button></div></a><div aria-labelledby="job_list___sub_heading_313_1" data-parent="#job_list___sub_accordion_313" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_313_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (163, 26), end pos: (163, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -160,7 +160,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ^ None = None, position: str | None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_314"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_314_1" aria-expanded="false" aria-controls="job_list___sub_collapse_314_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_314_1"><button class="btn btn-outline-danger"><span class="job_id">314 : Job ID d7324debc61b4fc491e4dba4f961307a</span></button></div></a><div aria-labelledby="job_list___sub_heading_314_1" data-parent="#job_list___sub_accordion_314" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_314_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (164, 22), end pos: (164, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -161,7 +161,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ^ None = None, ) -&gt; bytes: """Return a new PDF with an embedded watermark. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_315"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_315_1" aria-expanded="false" aria-controls="job_list___sub_collapse_315_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_315_1"><button class="btn btn-outline-danger"><span class="job_id">315 : Job ID 618abbe1c15f4c5eb32104ce95bf6b48</span></button></div></a><div aria-labelledby="job_list___sub_heading_315_1" data-parent="#job_list___sub_accordion_315" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_315_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=203" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (203, 22), end pos: (203, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -200,7 +200,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ^ None = None, ) -&gt; bool: """Return whether the method is applicable on this specific method </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_316"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_316_1" aria-expanded="false" aria-controls="job_list___sub_collapse_316_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_316_1"><button class="btn btn-outline-success"><span class="job_id">316 : Job ID a56f244a271f4e76946d86d79da2e9c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_316_1" data-parent="#job_list___sub_accordion_316" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_316_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (109, 7), end pos: (109, 10)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -106,7 +106,7 @@ else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") - if not is_pdf_bytes(data): + if is_pdf_bytes(data): raise ValueError("Input does not look like a valid PDF (missing %PDF header)") return data </pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: Input does not look like a valid PDF (missing %PDF header) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D106E7B6E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D105D9CFE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D106E7BC50&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D105D9CFE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-966/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D106EA1BB0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D106EA1580&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpydms73jc.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpydms73jc.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D106EA1070&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D106EA1C70&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D106EA1FA0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 20.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_317"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_317_1" aria-expanded="false" aria-controls="job_list___sub_collapse_317_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_317_1"><button class="btn btn-outline-success"><span class="job_id">317 : Job ID 6a76bd2998764fc3aef61e277580b15e</span></button></div></a><div aria-labelledby="job_list___sub_heading_317_1" data-parent="#job_list___sub_accordion_317" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_317_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (98, 7), end pos: (98, 41)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -95,7 +95,7 @@ ValueError If the resolved bytes do not appear to be a PDF file. """ - if isinstance(src, bytes | bytearray): + if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: string argument without an encoding _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D882437830&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D88137D2B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D882437DA0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D88137D2B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-314/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D88245DD00&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: &gt; raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") E TypeError: Unsupported PdfSource; expected bytes, path, or binary IO watermarking_method.py:107: TypeError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D88245D6D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmplqk4nwp5.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmplqk4nwp5.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D88245D1C0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: &gt; raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") E TypeError: Unsupported PdfSource; expected bytes, path, or binary IO watermarking_method.py:107: TypeError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D88245DDC0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: &gt; raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") E TypeError: Unsupported PdfSource; expected bytes, path, or binary IO watermarking_method.py:107: TypeError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001D88245E0F0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if not isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: &gt; raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") E TypeError: Unsupported PdfSource; expected bytes, path, or binary IO watermarking_method.py:107: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 20.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_318"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_318_1" aria-expanded="false" aria-controls="job_list___sub_collapse_318_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_318_1"><button class="btn btn-outline-success"><span class="job_id">318 : Job ID 20e0cd27b0834ff9a2a08d5201d7be27</span></button></div></a><div aria-labelledby="job_list___sub_heading_318_1" data-parent="#job_list___sub_accordion_318" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_318_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (109, 7), end pos: (109, 29)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -106,7 +106,7 @@ else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") - if not is_pdf_bytes(data): + if not not is_pdf_bytes(data): raise ValueError("Input does not look like a valid PDF (missing %PDF header)") return data </pre></div><div class="alert alert-secondary"><pre class="diff">.........FF..FFs.ssFssFs..........FFFF.F.. [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: Input does not look like a valid PDF (missing %PDF header) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000229EE24B530&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000229ED17D040&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000229EE24BAA0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000229ED17D040&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1466/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:95: in add_watermark data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ___________ TestWatermarkingUtils.test_explore_pdf_basic_structure ____________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000229EE271970&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_basic_structure(self, sample_pdf_bytes): """Test explore_pdf returns expected structure.""" &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ______________ TestWatermarkingUtils.test_explore_pdf_with_path _______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000229EE271340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp8mi3ty7y.pdf') def test_explore_pdf_with_path(self, sample_pdf_path): """Test explore_pdf with file path.""" &gt; result = WMUtils.explore_pdf(sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp8mi3ty7y.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError _________ TestWatermarkingUtils.test_explore_pdf_with_fitz_available __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000229EE270E30&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_with_fitz_available(self, sample_pdf_bytes): """Test explore_pdf when PyMuPDF (fitz) is available.""" # Mock the import inside the function with patch.dict("sys.modules", {"fitz": Mock()}): import sys mock_fitz = sys.modules["fitz"] # Mock fitz document mock_doc = Mock() mock_doc.page_count = 1 mock_doc.load_page.return_value.bound.return_value = [0, 0, 612, 792] mock_doc.xref_length.return_value = 4 mock_doc.xref_object.return_value = "&lt;&lt; /Type /Catalog &gt;&gt;" mock_doc.xref_is_stream.return_value = False mock_fitz.open.return_value = mock_doc &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000229EE271A30&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError __________ TestWatermarkingUtils.test_pdf_exploration_deterministic ___________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000229EE271D60&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_pdf_exploration_deterministic(self, sample_pdf_bytes): """Test that PDF exploration is deterministic.""" &gt; result1 = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:161: in explore_pdf data = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_basic_structure FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_path FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_with_fitz_available FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_pdf_exploration_deterministic 11 failed, 25 passed, 6 skipped, 23 warnings in 19.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_319"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_319_1" aria-expanded="false" aria-controls="job_list___sub_collapse_319_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_319_1"><button class="btn btn-outline-danger"><span class="job_id">319 : Job ID ff05b8cc4fee4b2bbb32a2d9847cc1e4</span></button></div></a><div aria-labelledby="job_list___sub_heading_319_1" data-parent="#job_list___sub_accordion_319" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_319_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=142" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (142, 4), end pos: (143, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -138,8 +138,6 @@ #: Concrete implementations should override this with a short name #: (e.g., "toy-eof", "xmp-metadata", "object-stream"). name: ClassVar[str] = "abstract" - - @staticmethod @abstractmethod def get_usage() -&gt; str: """Return a a string containing a description of the expected usage.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_320"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_320_1" aria-expanded="false" aria-controls="job_list___sub_collapse_320_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_320_1"><button class="btn btn-outline-danger"><span class="job_id">320 : Job ID c79edb4ee8274a3f887057bdfe24976d</span></button></div></a><div aria-labelledby="job_list___sub_heading_320_1" data-parent="#job_list___sub_accordion_320" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_320_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=143" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (143, 4), end pos: (144, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -140,7 +140,6 @@ name: ClassVar[str] = "abstract" @staticmethod - @abstractmethod def get_usage() -&gt; str: """Return a a string containing a description of the expected usage. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_321"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_321_1" aria-expanded="false" aria-controls="job_list___sub_collapse_321_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_321_1"><button class="btn btn-outline-success"><span class="job_id">321 : Job ID 590b29cd879049f1ad3f6728d52ce2d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_321_1" data-parent="#job_list___sub_accordion_321" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_321_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=157" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (157, 4), end pos: (158, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -153,8 +153,6 @@ Usage description. """ raise NotImplementedError - - @abstractmethod def add_watermark( self, pdf: PdfSource,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T005159810108Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T005200785165Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_322"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_322_1" aria-expanded="false" aria-controls="job_list___sub_collapse_322_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_322_1"><button class="btn btn-outline-danger"><span class="job_id">322 : Job ID 1e9c007cebd147ea8e73c027034c852f</span></button></div></a><div aria-labelledby="job_list___sub_heading_322_1" data-parent="#job_list___sub_accordion_322" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_322_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=199" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (199, 4), end pos: (200, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -195,8 +195,6 @@ If inputs are invalid (e.g., not a PDF or empty secret). """ raise NotImplementedError - - @abstractmethod def is_watermark_applicable( self, pdf: PdfSource,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_323"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_323_1" aria-expanded="false" aria-controls="job_list___sub_collapse_323_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_323_1"><button class="btn btn-outline-success"><span class="job_id">323 : Job ID 39277ec37e8f4c1794908374d2662f63</span></button></div></a><div aria-labelledby="job_list___sub_heading_323_1" data-parent="#job_list___sub_accordion_323" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_323_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_method.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">watermarking_method.py, start pos: (233, 4), end pos: (234, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_method.py +++ bwatermarking_method.py @@ -229,8 +229,6 @@ If inputs are invalid (e.g., not a PDF or empty secret). """ raise NotImplementedError - - @abstractmethod def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and return the embedded secret from ``pdf``. </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222905626416Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222906479765Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_324"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_324_1" aria-expanded="false" aria-controls="job_list___sub_collapse_324_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_324_1"><button class="btn btn-outline-danger"><span class="job_id">324 : Job ID 16b5ae56cd4c44b0bc72da0f41339fbd</span></button></div></a><div aria-labelledby="job_list___sub_heading_324_1" data-parent="#job_list___sub_accordion_324" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_324_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) - amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_325"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_325_1" aria-expanded="false" aria-controls="job_list___sub_collapse_325_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_325_1"><button class="btn btn-outline-danger"><span class="job_id">325 : Job ID e5c098b28ac84419b5ef8181dfeee056</span></button></div></a><div aria-labelledby="job_list___sub_heading_325_1" data-parent="#job_list___sub_accordion_325" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_325_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) - 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_326"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_326_1" aria-expanded="false" aria-controls="job_list___sub_collapse_326_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_326_1"><button class="btn btn-outline-danger"><span class="job_id">326 : Job ID 7519726ad5c744578f17c28b03afd162</span></button></div></a><div aria-labelledby="job_list___sub_heading_326_1" data-parent="#job_list___sub_accordion_326" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_326_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) - 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_327"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_327_1" aria-expanded="false" aria-controls="job_list___sub_collapse_327_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_327_1"><button class="btn btn-outline-danger"><span class="job_id">327 : Job ID c911f17ebed445baa12f09c310b65aae</span></button></div></a><div aria-labelledby="job_list___sub_heading_327_1" data-parent="#job_list___sub_accordion_327" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_327_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) - value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_328"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_328_1" aria-expanded="false" aria-controls="job_list___sub_collapse_328_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_328_1"><button class="btn btn-outline-danger"><span class="job_id">328 : Job ID 81079fe16c2f4dac94188aec7c89ae74</span></button></div></a><div aria-labelledby="job_list___sub_heading_328_1" data-parent="#job_list___sub_accordion_328" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_328_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' - v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_329"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_329_1" aria-expanded="false" aria-controls="job_list___sub_collapse_329_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_329_1"><button class="btn btn-outline-danger"><span class="job_id">329 : Job ID 7dc735414eda4507bd7b1f185aa2e743</span></button></div></a><div aria-labelledby="job_list___sub_heading_329_1" data-parent="#job_list___sub_accordion_329" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_329_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') - '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_330"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_330_1" aria-expanded="false" aria-controls="job_list___sub_collapse_330_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_330_1"><button class="btn btn-outline-danger"><span class="job_id">330 : Job ID 31e25f35dff64675a3e583850450cb01</span></button></div></a><div aria-labelledby="job_list___sub_heading_330_1" data-parent="#job_list___sub_accordion_330" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_330_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) - "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_331"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_331_1" aria-expanded="false" aria-controls="job_list___sub_collapse_331_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_331_1"><button class="btn btn-outline-danger"><span class="job_id">331 : Job ID 8e6d2b4f855f4f71acc30108598e159d</span></button></div></a><div aria-labelledby="job_list___sub_heading_331_1" data-parent="#job_list___sub_accordion_331" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_331_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) * amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_332"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_332_1" aria-expanded="false" aria-controls="job_list___sub_collapse_332_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_332_1"><button class="btn btn-outline-danger"><span class="job_id">332 : Job ID ab401a19a32c40edbaa257d3d598f3a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_332_1" data-parent="#job_list___sub_accordion_332" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_332_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) * 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_333"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_333_1" aria-expanded="false" aria-controls="job_list___sub_collapse_333_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_333_1"><button class="btn btn-outline-danger"><span class="job_id">333 : Job ID 3d3aa334d14743f8bd818bb0ed462172</span></button></div></a><div aria-labelledby="job_list___sub_heading_333_1" data-parent="#job_list___sub_accordion_333" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_333_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) * 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_334"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_334_1" aria-expanded="false" aria-controls="job_list___sub_collapse_334_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_334_1"><button class="btn btn-outline-danger"><span class="job_id">334 : Job ID e09d35a8b9844d13833c7741f8085bde</span></button></div></a><div aria-labelledby="job_list___sub_heading_334_1" data-parent="#job_list___sub_accordion_334" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_334_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) * value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_335"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_335_1" aria-expanded="false" aria-controls="job_list___sub_collapse_335_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_335_1"><button class="btn btn-outline-danger"><span class="job_id">335 : Job ID 2ee4a161a79c4d16a56b3511e4d34fa4</span></button></div></a><div aria-labelledby="job_list___sub_heading_335_1" data-parent="#job_list___sub_accordion_335" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_335_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' * v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_336"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_336_1" aria-expanded="false" aria-controls="job_list___sub_collapse_336_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_336_1"><button class="btn btn-outline-danger"><span class="job_id">336 : Job ID 23fa265f3c004b4584afdb5d6c3ed0d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_336_1" data-parent="#job_list___sub_accordion_336" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_336_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') * '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_337"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_337_1" aria-expanded="false" aria-controls="job_list___sub_collapse_337_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_337_1"><button class="btn btn-outline-danger"><span class="job_id">337 : Job ID 2433a60395da44cc850bdc7a67a64610</span></button></div></a><div aria-labelledby="job_list___sub_heading_337_1" data-parent="#job_list___sub_accordion_337" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_337_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) * "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_338"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_338_1" aria-expanded="false" aria-controls="job_list___sub_collapse_338_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_338_1"><button class="btn btn-outline-success"><span class="job_id">338 : Job ID 9c887775aa7c4242bb5baac489fcc775</span></button></div></a><div aria-labelledby="job_list___sub_heading_338_1" data-parent="#job_list___sub_accordion_338" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_338_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) / amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111258736657Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111259595739Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_339"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_339_1" aria-expanded="false" aria-controls="job_list___sub_collapse_339_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_339_1"><button class="btn btn-outline-success"><span class="job_id">339 : Job ID afef76247039415fbd3e6d8d74a729a2</span></button></div></a><div aria-labelledby="job_list___sub_heading_339_1" data-parent="#job_list___sub_accordion_339" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_339_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) / 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115703129290Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115704046941Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_340"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_340_1" aria-expanded="false" aria-controls="job_list___sub_collapse_340_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_340_1"><button class="btn btn-outline-danger"><span class="job_id">340 : Job ID f85f5b9296a34879ab14f6d7731bfe22</span></button></div></a><div aria-labelledby="job_list___sub_heading_340_1" data-parent="#job_list___sub_accordion_340" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_340_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) / 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_341"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_341_1" aria-expanded="false" aria-controls="job_list___sub_collapse_341_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_341_1"><button class="btn btn-outline-danger"><span class="job_id">341 : Job ID a30408ccc0c84290bc1adaf9b7b71f0c</span></button></div></a><div aria-labelledby="job_list___sub_heading_341_1" data-parent="#job_list___sub_accordion_341" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_341_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) / value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_342"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_342_1" aria-expanded="false" aria-controls="job_list___sub_collapse_342_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_342_1"><button class="btn btn-outline-danger"><span class="job_id">342 : Job ID 393525b564154ed284819d54eb0f58de</span></button></div></a><div aria-labelledby="job_list___sub_heading_342_1" data-parent="#job_list___sub_accordion_342" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_342_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' / v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_343"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_343_1" aria-expanded="false" aria-controls="job_list___sub_collapse_343_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_343_1"><button class="btn btn-outline-danger"><span class="job_id">343 : Job ID 7dada8c3da984ea7b8aa384915db2069</span></button></div></a><div aria-labelledby="job_list___sub_heading_343_1" data-parent="#job_list___sub_accordion_343" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_343_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') / '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_344"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_344_1" aria-expanded="false" aria-controls="job_list___sub_collapse_344_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_344_1"><button class="btn btn-outline-danger"><span class="job_id">344 : Job ID edb6d12ab91b41499e843fda7c3ddb4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_344_1" data-parent="#job_list___sub_accordion_344" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_344_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) / "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_345"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_345_1" aria-expanded="false" aria-controls="job_list___sub_collapse_345_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_345_1"><button class="btn btn-outline-danger"><span class="job_id">345 : Job ID 3d3d22368cbc4ee7a2c2a8d1fa3ba338</span></button></div></a><div aria-labelledby="job_list___sub_heading_345_1" data-parent="#job_list___sub_accordion_345" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_345_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) // amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_346"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_346_1" aria-expanded="false" aria-controls="job_list___sub_collapse_346_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_346_1"><button class="btn btn-outline-danger"><span class="job_id">346 : Job ID 5dcaefc4d3e841d8bd6e67619c2c6c7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_346_1" data-parent="#job_list___sub_accordion_346" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_346_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) // 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_347"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_347_1" aria-expanded="false" aria-controls="job_list___sub_collapse_347_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_347_1"><button class="btn btn-outline-danger"><span class="job_id">347 : Job ID 5d8abdddd76b431e850b27b285137db9</span></button></div></a><div aria-labelledby="job_list___sub_heading_347_1" data-parent="#job_list___sub_accordion_347" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_347_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) // 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_348"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_348_1" aria-expanded="false" aria-controls="job_list___sub_collapse_348_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_348_1"><button class="btn btn-outline-danger"><span class="job_id">348 : Job ID 1c49e54f839f4f30991df3d0fe800b49</span></button></div></a><div aria-labelledby="job_list___sub_heading_348_1" data-parent="#job_list___sub_accordion_348" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_348_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) // value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_349"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_349_1" aria-expanded="false" aria-controls="job_list___sub_collapse_349_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_349_1"><button class="btn btn-outline-success"><span class="job_id">349 : Job ID 88fc49af31c9476495083e2788dea3b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_349_1" data-parent="#job_list___sub_accordion_349" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_349_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' // v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095258668874Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095259512544Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_350"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_350_1" aria-expanded="false" aria-controls="job_list___sub_collapse_350_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_350_1"><button class="btn btn-outline-danger"><span class="job_id">350 : Job ID 1deec8b7b1364bdaa0140373bdfac287</span></button></div></a><div aria-labelledby="job_list___sub_heading_350_1" data-parent="#job_list___sub_accordion_350" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_350_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') // '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_351"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_351_1" aria-expanded="false" aria-controls="job_list___sub_collapse_351_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_351_1"><button class="btn btn-outline-danger"><span class="job_id">351 : Job ID 49444c25258440ba8e0bb4c2af7271f8</span></button></div></a><div aria-labelledby="job_list___sub_heading_351_1" data-parent="#job_list___sub_accordion_351" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_351_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) // "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_352"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_352_1" aria-expanded="false" aria-controls="job_list___sub_collapse_352_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_352_1"><button class="btn btn-outline-danger"><span class="job_id">352 : Job ID 3c5eeb55fda649fab135cdd5d90b0259</span></button></div></a><div aria-labelledby="job_list___sub_heading_352_1" data-parent="#job_list___sub_accordion_352" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_352_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) % amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_353"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_353_1" aria-expanded="false" aria-controls="job_list___sub_collapse_353_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_353_1"><button class="btn btn-outline-danger"><span class="job_id">353 : Job ID e111c2ff1176460086fe978a227224c2</span></button></div></a><div aria-labelledby="job_list___sub_heading_353_1" data-parent="#job_list___sub_accordion_353" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_353_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) % 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_354"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_354_1" aria-expanded="false" aria-controls="job_list___sub_collapse_354_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_354_1"><button class="btn btn-outline-danger"><span class="job_id">354 : Job ID e05b5510f9fc45fa89d3d80f163495b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_354_1" data-parent="#job_list___sub_accordion_354" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_354_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) % 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_355"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_355_1" aria-expanded="false" aria-controls="job_list___sub_collapse_355_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_355_1"><button class="btn btn-outline-success"><span class="job_id">355 : Job ID 17a0c2e478d046d09f4e23a40f2a00f3</span></button></div></a><div aria-labelledby="job_list___sub_heading_355_1" data-parent="#job_list___sub_accordion_355" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_355_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) % value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110400135005Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110401128688Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_356"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_356_1" aria-expanded="false" aria-controls="job_list___sub_collapse_356_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_356_1"><button class="btn btn-outline-danger"><span class="job_id">356 : Job ID 1f6791535ccc40eda3661b9c9f290af3</span></button></div></a><div aria-labelledby="job_list___sub_heading_356_1" data-parent="#job_list___sub_accordion_356" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_356_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' % v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_357"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_357_1" aria-expanded="false" aria-controls="job_list___sub_collapse_357_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_357_1"><button class="btn btn-outline-danger"><span class="job_id">357 : Job ID 3828a3f0ac6843a79a365597dbcb6572</span></button></div></a><div aria-labelledby="job_list___sub_heading_357_1" data-parent="#job_list___sub_accordion_357" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_357_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') % '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_358"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_358_1" aria-expanded="false" aria-controls="job_list___sub_collapse_358_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_358_1"><button class="btn btn-outline-danger"><span class="job_id">358 : Job ID c220808adec9493485e4fd4003040673</span></button></div></a><div aria-labelledby="job_list___sub_heading_358_1" data-parent="#job_list___sub_accordion_358" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_358_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) % "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_359"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_359_1" aria-expanded="false" aria-controls="job_list___sub_collapse_359_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_359_1"><button class="btn btn-outline-success"><span class="job_id">359 : Job ID 4bce42f066bb4231827ec0a9cf4da9e6</span></button></div></a><div aria-labelledby="job_list___sub_heading_359_1" data-parent="#job_list___sub_accordion_359" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_359_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) ** amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200241392056Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200242283727Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_360"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_360_1" aria-expanded="false" aria-controls="job_list___sub_collapse_360_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_360_1"><button class="btn btn-outline-success"><span class="job_id">360 : Job ID 1ae8afa510ab4b78bab63ebe3f05938f</span></button></div></a><div aria-labelledby="job_list___sub_heading_360_1" data-parent="#job_list___sub_accordion_360" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_360_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) ** 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T163901125833Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T163901970057Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_361"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_361_1" aria-expanded="false" aria-controls="job_list___sub_collapse_361_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_361_1"><button class="btn btn-outline-danger"><span class="job_id">361 : Job ID fc6aeab14a9a46b98a7c2e247469ebbc</span></button></div></a><div aria-labelledby="job_list___sub_heading_361_1" data-parent="#job_list___sub_accordion_361" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_361_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) ** 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_362"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_362_1" aria-expanded="false" aria-controls="job_list___sub_collapse_362_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_362_1"><button class="btn btn-outline-danger"><span class="job_id">362 : Job ID f6bb89d2953b4fe79e416d4d9e4006d9</span></button></div></a><div aria-labelledby="job_list___sub_heading_362_1" data-parent="#job_list___sub_accordion_362" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_362_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) ** value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_363"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_363_1" aria-expanded="false" aria-controls="job_list___sub_collapse_363_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_363_1"><button class="btn btn-outline-danger"><span class="job_id">363 : Job ID 8b91817107684ce695bf7a080fd17126</span></button></div></a><div aria-labelledby="job_list___sub_heading_363_1" data-parent="#job_list___sub_accordion_363" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_363_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' ** v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_364"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_364_1" aria-expanded="false" aria-controls="job_list___sub_collapse_364_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_364_1"><button class="btn btn-outline-danger"><span class="job_id">364 : Job ID 787e6680c4984d8ab17a31bb5ca6bc65</span></button></div></a><div aria-labelledby="job_list___sub_heading_364_1" data-parent="#job_list___sub_accordion_364" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_364_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') ** '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_365"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_365_1" aria-expanded="false" aria-controls="job_list___sub_collapse_365_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_365_1"><button class="btn btn-outline-danger"><span class="job_id">365 : Job ID 29c2c96581e34cc68ea5d1b3e97a289e</span></button></div></a><div aria-labelledby="job_list___sub_heading_365_1" data-parent="#job_list___sub_accordion_365" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_365_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) ** "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_366"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_366_1" aria-expanded="false" aria-controls="job_list___sub_collapse_366_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_366_1"><button class="btn btn-outline-success"><span class="job_id">366 : Job ID 7ea9a991355f4b4d97c99745cab2cc86</span></button></div></a><div aria-labelledby="job_list___sub_heading_366_1" data-parent="#job_list___sub_accordion_366" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_366_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) &gt;&gt; amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &gt;&gt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &gt;&gt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',), key = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &gt;&gt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &gt;&gt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 4 failed, 38 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_367"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_367_1" aria-expanded="false" aria-controls="job_list___sub_collapse_367_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_367_1"><button class="btn btn-outline-danger"><span class="job_id">367 : Job ID e242327df7a64665b1347fc03a66aaa3</span></button></div></a><div aria-labelledby="job_list___sub_heading_367_1" data-parent="#job_list___sub_accordion_367" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_367_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) &gt;&gt; 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_368"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_368_1" aria-expanded="false" aria-controls="job_list___sub_collapse_368_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_368_1"><button class="btn btn-outline-danger"><span class="job_id">368 : Job ID 0fc542302f2640cc8f0d307983708a7e</span></button></div></a><div aria-labelledby="job_list___sub_heading_368_1" data-parent="#job_list___sub_accordion_368" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_368_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) &gt;&gt; 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_369"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_369_1" aria-expanded="false" aria-controls="job_list___sub_collapse_369_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_369_1"><button class="btn btn-outline-success"><span class="job_id">369 : Job ID d25f8ac369ae415e9d9dc54b9b6aa347</span></button></div></a><div aria-labelledby="job_list___sub_heading_369_1" data-parent="#job_list___sub_accordion_369" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_369_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) &gt;&gt; value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...ogin_select',), 0.5): 1, (('login_select',), 1): 1, (('login_select',), 2.5): 1, (('login_select',), inf): 1}, sums={}) value = 0.13282394409179688, label_values = ('login_select',) labels = ('login_select',), b = 2.5, inf_key = (('login_select',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &gt;&gt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 1, (('insert_document',), 1): 1, (('insert_document',), 2.5): 1, (('insert_document',), inf): 1}, sums={}) value = 0.049324750900268555, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &gt;&gt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 2, (('insert_document',), 1): 2, (('insert_document',), 2.5): 2, (('insert_document',), inf): 2}, sums={}) value = 0.04786825180053711, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &gt;&gt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 5 failed, 37 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_370"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_370_1" aria-expanded="false" aria-controls="job_list___sub_collapse_370_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_370_1"><button class="btn btn-outline-danger"><span class="job_id">370 : Job ID bb4ee2a53d2a447883d59c7da4e67e6a</span></button></div></a><div aria-labelledby="job_list___sub_heading_370_1" data-parent="#job_list___sub_accordion_370" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_370_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' &gt;&gt; v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_371"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_371_1" aria-expanded="false" aria-controls="job_list___sub_collapse_371_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_371_1"><button class="btn btn-outline-danger"><span class="job_id">371 : Job ID 4765c6ef59da408781dbc13911193921</span></button></div></a><div aria-labelledby="job_list___sub_heading_371_1" data-parent="#job_list___sub_accordion_371" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_371_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') &gt;&gt; '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_372"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_372_1" aria-expanded="false" aria-controls="job_list___sub_collapse_372_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_372_1"><button class="btn btn-outline-danger"><span class="job_id">372 : Job ID ba5e307f6c9f49bcaa81db9b3e172cab</span></button></div></a><div aria-labelledby="job_list___sub_heading_372_1" data-parent="#job_list___sub_accordion_372" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_372_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) &gt;&gt; "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_373"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_373_1" aria-expanded="false" aria-controls="job_list___sub_collapse_373_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_373_1"><button class="btn btn-outline-success"><span class="job_id">373 : Job ID 20505d345e954ed8ad3f91ec51ee2d5b</span></button></div></a><div aria-labelledby="job_list___sub_heading_373_1" data-parent="#job_list___sub_accordion_373" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_373_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) &lt;&lt; amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &lt;&lt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &lt;&lt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',), key = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &lt;&lt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &lt;&lt; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 4 failed, 38 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_374"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_374_1" aria-expanded="false" aria-controls="job_list___sub_collapse_374_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_374_1"><button class="btn btn-outline-success"><span class="job_id">374 : Job ID 589e7a438df64338a40571a15cd5f31f</span></button></div></a><div aria-labelledby="job_list___sub_heading_374_1" data-parent="#job_list___sub_accordion_374" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_374_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) &lt;&lt; 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095320659499Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095321606514Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_375"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_375_1" aria-expanded="false" aria-controls="job_list___sub_collapse_375_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_375_1"><button class="btn btn-outline-danger"><span class="job_id">375 : Job ID 864e4e5dbf964c438591a8123d7411b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_375_1" data-parent="#job_list___sub_accordion_375" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_375_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) &lt;&lt; 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_376"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_376_1" aria-expanded="false" aria-controls="job_list___sub_collapse_376_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_376_1"><button class="btn btn-outline-success"><span class="job_id">376 : Job ID da7bddda59534ce4891486000156c1e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_376_1" data-parent="#job_list___sub_accordion_376" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_376_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) &lt;&lt; value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...ogin_select',), 0.5): 1, (('login_select',), 1): 1, (('login_select',), 2.5): 1, (('login_select',), inf): 1}, sums={}) value = 0.11977720260620117, label_values = ('login_select',) labels = ('login_select',), b = 2.5, inf_key = (('login_select',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &lt;&lt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 1, (('insert_document',), 1): 1, (('insert_document',), 2.5): 1, (('insert_document',), inf): 1}, sums={}) value = 0.08319687843322754, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &lt;&lt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 2, (('insert_document',), 1): 2, (('insert_document',), 2.5): 2, (('insert_document',), inf): 2}, sums={}) value = 0.06415152549743652, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &lt;&lt; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 5 failed, 37 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_377"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_377_1" aria-expanded="false" aria-controls="job_list___sub_collapse_377_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_377_1"><button class="btn btn-outline-danger"><span class="job_id">377 : Job ID 76d21ae5a42f442686becf059fda8eac</span></button></div></a><div aria-labelledby="job_list___sub_heading_377_1" data-parent="#job_list___sub_accordion_377" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_377_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' &lt;&lt; v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_378"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_378_1" aria-expanded="false" aria-controls="job_list___sub_collapse_378_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_378_1"><button class="btn btn-outline-danger"><span class="job_id">378 : Job ID f3900ce86735451ba8bb2c8851733c16</span></button></div></a><div aria-labelledby="job_list___sub_heading_378_1" data-parent="#job_list___sub_accordion_378" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_378_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') &lt;&lt; '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_379"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_379_1" aria-expanded="false" aria-controls="job_list___sub_collapse_379_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_379_1"><button class="btn btn-outline-danger"><span class="job_id">379 : Job ID 0b8b439ea3464f9fb62e1dfd1a76b34e</span></button></div></a><div aria-labelledby="job_list___sub_heading_379_1" data-parent="#job_list___sub_accordion_379" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_379_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) &lt;&lt; "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_380"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_380_1" aria-expanded="false" aria-controls="job_list___sub_collapse_380_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_380_1"><button class="btn btn-outline-success"><span class="job_id">380 : Job ID 96effd0a8de94d40b714b166e977a8cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_380_1" data-parent="#job_list___sub_accordion_380" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_380_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) | amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) | amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) | amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',), key = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) | amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) | amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 4 failed, 38 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_381"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_381_1" aria-expanded="false" aria-controls="job_list___sub_collapse_381_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_381_1"><button class="btn btn-outline-danger"><span class="job_id">381 : Job ID 6707ae97d56e4ca19933eeeb6b0f6ef1</span></button></div></a><div aria-labelledby="job_list___sub_heading_381_1" data-parent="#job_list___sub_accordion_381" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_381_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) | 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_382"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_382_1" aria-expanded="false" aria-controls="job_list___sub_collapse_382_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_382_1"><button class="btn btn-outline-danger"><span class="job_id">382 : Job ID c8554903ed7a485287849d40f4ddc04c</span></button></div></a><div aria-labelledby="job_list___sub_heading_382_1" data-parent="#job_list___sub_accordion_382" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_382_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) | 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_383"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_383_1" aria-expanded="false" aria-controls="job_list___sub_collapse_383_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_383_1"><button class="btn btn-outline-success"><span class="job_id">383 : Job ID 20fe1dd33c6443dc81d0a15027ff38a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_383_1" data-parent="#job_list___sub_accordion_383" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_383_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) | value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for |: 'float' and 'float' ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for |: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...ogin_select',), 0.5): 1, (('login_select',), 1): 1, (('login_select',), 2.5): 1, (('login_select',), inf): 1}, sums={}) value = 0.1242227554321289, label_values = ('login_select',) labels = ('login_select',), b = 2.5, inf_key = (('login_select',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) | value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for |: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 1, (('insert_document',), 1): 1, (('insert_document',), 2.5): 1, (('insert_document',), inf): 1}, sums={}) value = 0.0498652458190918, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) | value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for |: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for |: 'float' and 'float' ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for |: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for |: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 2, (('insert_document',), 1): 2, (('insert_document',), 2.5): 2, (('insert_document',), inf): 2}, sums={}) value = 0.05294060707092285, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) | value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for |: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 5 failed, 37 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_384"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_384_1" aria-expanded="false" aria-controls="job_list___sub_collapse_384_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_384_1"><button class="btn btn-outline-danger"><span class="job_id">384 : Job ID a093fbb2980b4358837ef590261522db</span></button></div></a><div aria-labelledby="job_list___sub_heading_384_1" data-parent="#job_list___sub_accordion_384" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_384_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' | v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_385"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_385_1" aria-expanded="false" aria-controls="job_list___sub_collapse_385_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_385_1"><button class="btn btn-outline-danger"><span class="job_id">385 : Job ID 0f726709428e4423b96b7e7cc2a44523</span></button></div></a><div aria-labelledby="job_list___sub_heading_385_1" data-parent="#job_list___sub_accordion_385" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_385_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') | '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_386"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_386_1" aria-expanded="false" aria-controls="job_list___sub_collapse_386_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_386_1"><button class="btn btn-outline-danger"><span class="job_id">386 : Job ID 5b712deaa5cb4bc6b03d91519b5945ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_386_1" data-parent="#job_list___sub_accordion_386" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_386_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) | "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_387"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_387_1" aria-expanded="false" aria-controls="job_list___sub_collapse_387_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_387_1"><button class="btn btn-outline-success"><span class="job_id">387 : Job ID 1bcb38b3d5334290b62733bb09b7eda2</span></button></div></a><div aria-labelledby="job_list___sub_heading_387_1" data-parent="#job_list___sub_accordion_387" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_387_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) &amp; amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &amp; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &amp; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',), key = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &amp; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) &amp; amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 4 failed, 38 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_388"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_388_1" aria-expanded="false" aria-controls="job_list___sub_collapse_388_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_388_1"><button class="btn btn-outline-danger"><span class="job_id">388 : Job ID 35018ca8a23b41248d3fa4d20e627c0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_388_1" data-parent="#job_list___sub_accordion_388" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_388_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) &amp; 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_389"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_389_1" aria-expanded="false" aria-controls="job_list___sub_collapse_389_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_389_1"><button class="btn btn-outline-danger"><span class="job_id">389 : Job ID bfba289e10c849228e2fa327aba8cefa</span></button></div></a><div aria-labelledby="job_list___sub_heading_389_1" data-parent="#job_list___sub_accordion_389" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_389_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) &amp; 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_390"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_390_1" aria-expanded="false" aria-controls="job_list___sub_collapse_390_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_390_1"><button class="btn btn-outline-success"><span class="job_id">390 : Job ID 98e341a577d44c37bc72ccb082a05d73</span></button></div></a><div aria-labelledby="job_list___sub_heading_390_1" data-parent="#job_list___sub_accordion_390" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_390_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) &amp; value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &amp;: 'float' and 'float' ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &amp;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...ogin_select',), 0.5): 1, (('login_select',), 1): 1, (('login_select',), 2.5): 1, (('login_select',), inf): 1}, sums={}) value = 0.10856175422668457, label_values = ('login_select',) labels = ('login_select',), b = 2.5, inf_key = (('login_select',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &amp; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &amp;: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 1, (('insert_document',), 1): 1, (('insert_document',), 2.5): 1, (('insert_document',), inf): 1}, sums={}) value = 0.03545260429382324, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &amp; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &amp;: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &amp;: 'float' and 'float' ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &amp;: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for &amp;: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 2, (('insert_document',), 1): 2, (('insert_document',), 2.5): 2, (('insert_document',), inf): 2}, sums={}) value = 0.05100846290588379, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) &amp; value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for &amp;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 5 failed, 37 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_391"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_391_1" aria-expanded="false" aria-controls="job_list___sub_collapse_391_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_391_1"><button class="btn btn-outline-danger"><span class="job_id">391 : Job ID c2c2c6d82a2948048ea0bafafe541877</span></button></div></a><div aria-labelledby="job_list___sub_heading_391_1" data-parent="#job_list___sub_accordion_391" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_391_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' &amp; v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_392"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_392_1" aria-expanded="false" aria-controls="job_list___sub_collapse_392_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_392_1"><button class="btn btn-outline-danger"><span class="job_id">392 : Job ID 9c27d7a25e9f42148ee5c7c9ebaf8054</span></button></div></a><div aria-labelledby="job_list___sub_heading_392_1" data-parent="#job_list___sub_accordion_392" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_392_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') &amp; '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_393"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_393_1" aria-expanded="false" aria-controls="job_list___sub_collapse_393_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_393_1"><button class="btn btn-outline-danger"><span class="job_id">393 : Job ID 52fff9a55076499ca293e97b8c1d4f33</span></button></div></a><div aria-labelledby="job_list___sub_heading_393_1" data-parent="#job_list___sub_accordion_393" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_393_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) &amp; "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_394"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_394_1" aria-expanded="false" aria-controls="job_list___sub_collapse_394_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_394_1"><button class="btn btn-outline-success"><span class="job_id">394 : Job ID 5aac1e4abc4243a0a7f7c8bfe76fa045</span></button></div></a><div aria-labelledby="job_list___sub_heading_394_1" data-parent="#job_list___sub_accordion_394" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_394_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 53), end pos: (40, 54)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 0.0) ^ amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) ^ amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) ^ amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',), key = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) ^ amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = (), key = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) &gt; self.values[key] = self.values.get(key, 0.0) ^ amount ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:40: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 4 failed, 38 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_395"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_395_1" aria-expanded="false" aria-controls="job_list___sub_collapse_395_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_395_1"><button class="btn btn-outline-danger"><span class="job_id">395 : Job ID 568544d1bb8743f4afe0b4e4b5486fe9</span></button></div></a><div aria-labelledby="job_list___sub_heading_395_1" data-parent="#job_list___sub_accordion_395" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_395_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 75), end pos: (72, 76)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) ^ 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_396"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_396_1" aria-expanded="false" aria-controls="job_list___sub_collapse_396_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_396_1"><button class="btn btn-outline-danger"><span class="job_id">396 : Job ID df1f280696c34ff4940530ea653a75f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_396_1" data-parent="#job_list___sub_accordion_396" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_396_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 59), end pos: (75, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) ^ 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_397"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_397_1" aria-expanded="false" aria-controls="job_list___sub_collapse_397_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_397_1"><button class="btn btn-outline-success"><span class="job_id">397 : Job ID 985967f146024a1eac2a782b6ba1d73c</span></button></div></a><div aria-labelledby="job_list___sub_heading_397_1" data-parent="#job_list___sub_accordion_397" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_397_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 55), end pos: (76, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 0.0) ^ value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for ^: 'float' and 'float' ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for ^: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...ogin_select',), 0.5): 1, (('login_select',), 1): 1, (('login_select',), 2.5): 1, (('login_select',), inf): 1}, sums={}) value = 0.10797476768493652, label_values = ('login_select',) labels = ('login_select',), b = 2.5, inf_key = (('login_select',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) ^ value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for ^: 'float' and 'float' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 1, (('insert_document',), 1): 1, (('insert_document',), 2.5): 1, (('insert_document',), inf): 1}, sums={}) value = 0.0342707633972168, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) ^ value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for ^: 'float' and 'float' _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for ^: 'float' and 'float' ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ^: 'float' and 'float' WARNING server:server.py:160 after_request instrumentation failed: unsupported operand type(s) for ^: 'float' and 'float' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...nt',), 0.5): 2, (('insert_document',), 1): 2, (('insert_document',), 2.5): 2, (('insert_document',), inf): 2}, sums={}) value = 0.033750295639038086, label_values = ('insert_document',) labels = ('insert_document',), b = 2.5, inf_key = (('insert_document',), inf) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 &gt; self.sums[labels] = self.sums.get(labels, 0.0) ^ value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' observability.py:76: TypeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: unsupported operand type(s) for ^: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 5 failed, 37 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_398"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_398_1" aria-expanded="false" aria-controls="job_list___sub_collapse_398_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_398_1"><button class="btn btn-outline-danger"><span class="job_id">398 : Job ID c5c6da70530945f880d80dd3a933aaec</span></button></div></a><div aria-labelledby="job_list___sub_heading_398_1" data-parent="#job_list___sub_accordion_398" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_398_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 15), end pos: (110, 16)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' ^ v.replace('"', '\\"') + '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_399"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_399_1" aria-expanded="false" aria-controls="job_list___sub_collapse_399_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_399_1"><button class="btn btn-outline-danger"><span class="job_id">399 : Job ID 759cbc979d824f0894a6b3e6c7e30432</span></button></div></a><div aria-labelledby="job_list___sub_heading_399_1" data-parent="#job_list___sub_accordion_399" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_399_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (110, 39), end pos: (110, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -107,7 +107,7 @@ def _quote(v: str) -&gt; str: - return '"' + v.replace('"', '\\"') + '"' + return '"' + v.replace('"', '\\"') ^ '"' _lock = Lock()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_400"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_400_1" aria-expanded="false" aria-controls="job_list___sub_collapse_400_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_400_1"><button class="btn btn-outline-danger"><span class="job_id">400 : Job ID cb80febc9da34de69b775e27e34e43ab</span></button></div></a><div aria-labelledby="job_list___sub_heading_400_1" data-parent="#job_list___sub_accordion_400" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_400_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=322" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (322, 28), end pos: (322, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -319,7 +319,7 @@ def render_prometheus() -&gt; str: parts = [m.render() for m in _ALL] # type: ignore[attr-defined] - return "\n".join(parts) + "\n" + return "\n".join(parts) ^ "\n" # Convenience timer context manager (not widely used yet, but available)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_401"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_401_1" aria-expanded="false" aria-controls="job_list___sub_collapse_401_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_401_1"><button class="btn btn-outline-danger"><span class="job_id">401 : Job ID 6c624ca24a1d4e64b1571c74d5700108</span></button></div></a><div aria-labelledby="job_list___sub_heading_401_1" data-parent="#job_list___sub_accordion_401" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_401_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() + self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_402"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_402_1" aria-expanded="false" aria-controls="job_list___sub_collapse_402_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_402_1"><button class="btn btn-outline-danger"><span class="job_id">402 : Job ID 6d4c0535b4af4a98b960e33d7e47a4ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_402_1" data-parent="#job_list___sub_accordion_402" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_402_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() * self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_403"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_403_1" aria-expanded="false" aria-controls="job_list___sub_collapse_403_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_403_1"><button class="btn btn-outline-success"><span class="job_id">403 : Job ID aa8dfabf768f42169539583496a8216c</span></button></div></a><div aria-labelledby="job_list___sub_heading_403_1" data-parent="#job_list___sub_accordion_403" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_403_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() / self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133716887671Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133717780844Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_404"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_404_1" aria-expanded="false" aria-controls="job_list___sub_collapse_404_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_404_1"><button class="btn btn-outline-success"><span class="job_id">404 : Job ID a7c3bb30f4ab41ddb3d2b8721b14908a</span></button></div></a><div aria-labelledby="job_list___sub_heading_404_1" data-parent="#job_list___sub_accordion_404" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_404_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() // self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T174732394530Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T174733259938Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_405"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_405_1" aria-expanded="false" aria-controls="job_list___sub_collapse_405_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_405_1"><button class="btn btn-outline-danger"><span class="job_id">405 : Job ID 769633fb5b724b92a396011233ba7a93</span></button></div></a><div aria-labelledby="job_list___sub_heading_405_1" data-parent="#job_list___sub_accordion_405" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_405_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() % self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_406"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_406_1" aria-expanded="false" aria-controls="job_list___sub_collapse_406_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_406_1"><button class="btn btn-outline-danger"><span class="job_id">406 : Job ID b0ee2bcff23a47f9b27eee207addac3e</span></button></div></a><div aria-labelledby="job_list___sub_heading_406_1" data-parent="#job_list___sub_accordion_406" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_406_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() ** self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_407"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_407_1" aria-expanded="false" aria-controls="job_list___sub_collapse_407_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_407_1"><button class="btn btn-outline-danger"><span class="job_id">407 : Job ID 6998b06ef32a431bb59a6d40af774b05</span></button></div></a><div aria-labelledby="job_list___sub_heading_407_1" data-parent="#job_list___sub_accordion_407" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_407_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() &gt;&gt; self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_408"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_408_1" aria-expanded="false" aria-controls="job_list___sub_collapse_408_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_408_1"><button class="btn btn-outline-danger"><span class="job_id">408 : Job ID b1cd2694dce94ebcb4d37ff2c40ff1c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_408_1" data-parent="#job_list___sub_accordion_408" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_408_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() &lt;&lt; self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_409"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_409_1" aria-expanded="false" aria-controls="job_list___sub_collapse_409_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_409_1"><button class="btn btn-outline-danger"><span class="job_id">409 : Job ID 35d8bc3b1fee45f7a95d84c2e430dedc</span></button></div></a><div aria-labelledby="job_list___sub_heading_409_1" data-parent="#job_list___sub_accordion_409" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_409_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() | self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_410"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_410_1" aria-expanded="false" aria-controls="job_list___sub_collapse_410_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_410_1"><button class="btn btn-outline-danger"><span class="job_id">410 : Job ID 6b7d2def2dea4144ad7d8bb94e884ee2</span></button></div></a><div aria-labelledby="job_list___sub_heading_410_1" data-parent="#job_list___sub_accordion_410" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_410_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() &amp; self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_411"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_411_1" aria-expanded="false" aria-controls="job_list___sub_collapse_411_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_411_1"><button class="btn btn-outline-danger"><span class="job_id">411 : Job ID 14a3772f1d9941a89e83748e0030dd19</span></button></div></a><div aria-labelledby="job_list___sub_heading_411_1" data-parent="#job_list___sub_accordion_411" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_411_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=332" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (332, 30), end pos: (332, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -329,6 +329,6 @@ return self def __exit__(self): - self.elapsed = time() - self._start + self.elapsed = time() ^ self._start return False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_412"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_412_1" aria-expanded="false" aria-controls="job_list___sub_collapse_412_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_412_1"><button class="btn btn-outline-danger"><span class="job_id">412 : Job ID fc289b7450004689a9cb1cfe3dcd4939</span></button></div></a><div aria-labelledby="job_list___sub_heading_412_1" data-parent="#job_list___sub_accordion_412" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_412_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int + None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_413"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_413_1" aria-expanded="false" aria-controls="job_list___sub_collapse_413_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_413_1"><button class="btn btn-outline-success"><span class="job_id">413 : Job ID 959902d55de94889bb627da00f9a115f</span></button></div></a><div aria-labelledby="job_list___sub_heading_413_1" data-parent="#job_list___sub_accordion_413" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_413_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int - None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125351661098Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125352556703Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_414"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_414_1" aria-expanded="false" aria-controls="job_list___sub_collapse_414_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_414_1"><button class="btn btn-outline-danger"><span class="job_id">414 : Job ID dab790098f5c4995bfe92f34e51f6217</span></button></div></a><div aria-labelledby="job_list___sub_heading_414_1" data-parent="#job_list___sub_accordion_414" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_414_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int * None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_415"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_415_1" aria-expanded="false" aria-controls="job_list___sub_collapse_415_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_415_1"><button class="btn btn-outline-danger"><span class="job_id">415 : Job ID 66636d501dbb4eb19a5a4b29f9564d3e</span></button></div></a><div aria-labelledby="job_list___sub_heading_415_1" data-parent="#job_list___sub_accordion_415" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_415_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int / None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_416"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_416_1" aria-expanded="false" aria-controls="job_list___sub_collapse_416_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_416_1"><button class="btn btn-outline-danger"><span class="job_id">416 : Job ID 0dbc8042e95d41578852ba6ae28a6c8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_416_1" data-parent="#job_list___sub_accordion_416" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_416_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int // None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_417"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_417_1" aria-expanded="false" aria-controls="job_list___sub_collapse_417_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_417_1"><button class="btn btn-outline-danger"><span class="job_id">417 : Job ID 5f10c83ea4034f198c6da2f0a195309a</span></button></div></a><div aria-labelledby="job_list___sub_heading_417_1" data-parent="#job_list___sub_accordion_417" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_417_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int % None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_418"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_418_1" aria-expanded="false" aria-controls="job_list___sub_collapse_418_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_418_1"><button class="btn btn-outline-danger"><span class="job_id">418 : Job ID 7d3c1dfc9090409b96f841cd45b37497</span></button></div></a><div aria-labelledby="job_list___sub_heading_418_1" data-parent="#job_list___sub_accordion_418" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_418_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int ** None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_419"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_419_1" aria-expanded="false" aria-controls="job_list___sub_collapse_419_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_419_1"><button class="btn btn-outline-danger"><span class="job_id">419 : Job ID 89dbb94d7962419c9d025387b054a425</span></button></div></a><div aria-labelledby="job_list___sub_heading_419_1" data-parent="#job_list___sub_accordion_419" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_419_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int &gt;&gt; None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_420"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_420_1" aria-expanded="false" aria-controls="job_list___sub_collapse_420_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_420_1"><button class="btn btn-outline-danger"><span class="job_id">420 : Job ID d85dcc7547d5470b903d11855ce3c6e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_420_1" data-parent="#job_list___sub_accordion_420" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_420_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int &lt;&lt; None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_421"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_421_1" aria-expanded="false" aria-controls="job_list___sub_collapse_421_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_421_1"><button class="btn btn-outline-success"><span class="job_id">421 : Job ID ab43dee0327b47b5a73e7f427ac8f0b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_421_1" data-parent="#job_list___sub_accordion_421" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_421_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int &amp; None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122132641215Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122133727259Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_422"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_422_1" aria-expanded="false" aria-controls="job_list___sub_collapse_422_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_422_1"><button class="btn btn-outline-success"><span class="job_id">422 : Job ID a46ba1cb35784ff0b6ce87c3b3fecaf1</span></button></div></a><div aria-labelledby="job_list___sub_heading_422_1" data-parent="#job_list___sub_accordion_422" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_422_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (262, 60), end pos: (262, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -259,7 +259,7 @@ INFLIGHT.inc(route) -def observe_request_size(method: str, route: str, size: int | None) -&gt; None: +def observe_request_size(method: str, route: str, size: int ^ None) -&gt; None: if size is None or size &lt; 0: return with _lock:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150630589590Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150631483440Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_423"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_423_1" aria-expanded="false" aria-controls="job_list___sub_collapse_423_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_423_1"><button class="btn btn-outline-success"><span class="job_id">423 : Job ID 4b67681bb04b4ef8b5ba8e0332159c0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_423_1" data-parent="#job_list___sub_accordion_423" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_423_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) == len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) == len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) == len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) == len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) == len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - ValueError: Label c... FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 4 failed, 38 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_424"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_424_1" aria-expanded="false" aria-controls="job_list___sub_collapse_424_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_424_1"><button class="btn btn-outline-success"><span class="job_id">424 : Job ID a41c4e5ebb1140f19b837b129cd4372f</span></button></div></a><div aria-labelledby="job_list___sub_heading_424_1" data-parent="#job_list___sub_accordion_424" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_424_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) == len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:236 Database error in create_user: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.10580921173095703, label_values = ('login_select',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) == len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.04967784881591797, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) == len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.0800013542175293, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) == len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 5 failed, 37 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_425"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_425_1" aria-expanded="false" aria-controls="job_list___sub_collapse_425_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_425_1"><button class="btn btn-outline-danger"><span class="job_id">425 : Job ID f8d168b52b4a4e4ea93da770f36d026a</span></button></div></a><div aria-labelledby="job_list___sub_heading_425_1" data-parent="#job_list___sub_accordion_425" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_425_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) &lt; len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_426"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_426_1" aria-expanded="false" aria-controls="job_list___sub_collapse_426_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_426_1"><button class="btn btn-outline-success"><span class="job_id">426 : Job ID 578745763d3a4a6da387df1f350950e4</span></button></div></a><div aria-labelledby="job_list___sub_heading_426_1" data-parent="#job_list___sub_accordion_426" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_426_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) &lt; len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150814624712Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150815498322Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_427"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_427_1" aria-expanded="false" aria-controls="job_list___sub_collapse_427_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_427_1"><button class="btn btn-outline-success"><span class="job_id">427 : Job ID 847c247862cc4752b3b3501647efe7ca</span></button></div></a><div aria-labelledby="job_list___sub_heading_427_1" data-parent="#job_list___sub_accordion_427" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_427_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) &lt;= len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &lt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &lt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &lt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &lt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - ValueError: Label c... FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 4 failed, 38 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_428"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_428_1" aria-expanded="false" aria-controls="job_list___sub_collapse_428_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_428_1"><button class="btn btn-outline-success"><span class="job_id">428 : Job ID 7f60f4e237284a76b31c61be40aaaca8</span></button></div></a><div aria-labelledby="job_list___sub_heading_428_1" data-parent="#job_list___sub_accordion_428" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_428_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) &lt;= len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:236 Database error in create_user: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.12454390525817871, label_values = ('login_select',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &lt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.0481715202331543, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &lt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.05330085754394531, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &lt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 5 failed, 37 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_429"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_429_1" aria-expanded="false" aria-controls="job_list___sub_collapse_429_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_429_1"><button class="btn btn-outline-danger"><span class="job_id">429 : Job ID 86c476d4b2bc4d3498b42a23800877ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_429_1" data-parent="#job_list___sub_accordion_429" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_429_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) &gt; len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_430"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_430_1" aria-expanded="false" aria-controls="job_list___sub_collapse_430_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_430_1"><button class="btn btn-outline-danger"><span class="job_id">430 : Job ID 393e1c80bfb349adb79ea6ad1a6b10e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_430_1" data-parent="#job_list___sub_accordion_430" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_430_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) &gt; len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_431"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_431_1" aria-expanded="false" aria-controls="job_list___sub_collapse_431_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_431_1"><button class="btn btn-outline-success"><span class="job_id">431 : Job ID d24f58b70660410da5c85ff4d7b77275</span></button></div></a><div aria-labelledby="job_list___sub_heading_431_1" data-parent="#job_list___sub_accordion_431" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_431_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) &gt;= len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &gt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &gt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &gt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) &gt;= len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - ValueError: Label c... FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 4 failed, 38 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_432"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_432_1" aria-expanded="false" aria-controls="job_list___sub_collapse_432_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_432_1"><button class="btn btn-outline-success"><span class="job_id">432 : Job ID d9455e30fd1b4d50abc21125db8e71bd</span></button></div></a><div aria-labelledby="job_list___sub_heading_432_1" data-parent="#job_list___sub_accordion_432" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_432_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) &gt;= len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:236 Database error in create_user: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.1242680549621582, label_values = ('login_select',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &gt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.03498554229736328, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &gt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.04996514320373535, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) &gt;= len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 5 failed, 37 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_433"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_433_1" aria-expanded="false" aria-controls="job_list___sub_collapse_433_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_433_1"><button class="btn btn-outline-success"><span class="job_id">433 : Job ID e8c18c534405413fb610061a0d6f2899</span></button></div></a><div aria-labelledby="job_list___sub_heading_433_1" data-parent="#job_list___sub_accordion_433" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_433_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) is len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) is len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) is len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) is len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if len(label_values) is len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - ValueError: Label c... FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 4 failed, 38 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_434"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_434_1" aria-expanded="false" aria-controls="job_list___sub_collapse_434_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_434_1"><button class="btn btn-outline-success"><span class="job_id">434 : Job ID 3818eeeb094e4741b59d2d5f026aadd2</span></button></div></a><div aria-labelledby="job_list___sub_heading_434_1" data-parent="#job_list___sub_accordion_434" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_434_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) is len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:236 Database error in create_user: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.10778403282165527, label_values = ('login_select',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) is len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.047585487365722656, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) is len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.05627775192260742, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if len(label_values) is len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 5 failed, 37 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_435"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_435_1" aria-expanded="false" aria-controls="job_list___sub_collapse_435_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_435_1"><button class="btn btn-outline-danger"><span class="job_id">435 : Job ID 1ca84899ae1e4840813344eab8cb0f61</span></button></div></a><div aria-labelledby="job_list___sub_heading_435_1" data-parent="#job_list___sub_accordion_435" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_435_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 29), end pos: (37, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if len(label_values) is not len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_436"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_436_1" aria-expanded="false" aria-controls="job_list___sub_collapse_436_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_436_1"><button class="btn btn-outline-danger"><span class="job_id">436 : Job ID 145e17bf3cdf4ae58d57dcb4433ca311</span></button></div></a><div aria-labelledby="job_list___sub_heading_436_1" data-parent="#job_list___sub_accordion_436" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_436_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 29), end pos: (65, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if len(label_values) is not len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_437"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_437_1" aria-expanded="false" aria-controls="job_list___sub_collapse_437_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_437_1"><button class="btn btn-outline-danger"><span class="job_id">437 : Job ID ac6afab9e27f4d9a80d2ac1783d8f129</span></button></div></a><div aria-labelledby="job_list___sub_heading_437_1" data-parent="#job_list___sub_accordion_437" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_437_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 28), end pos: (263, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size == 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_438"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_438_1" aria-expanded="false" aria-controls="job_list___sub_collapse_438_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_438_1"><button class="btn btn-outline-danger"><span class="job_id">438 : Job ID 8033e8f0b25b40c590d103c81902fb61</span></button></div></a><div aria-labelledby="job_list___sub_heading_438_1" data-parent="#job_list___sub_accordion_438" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_438_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 28), end pos: (263, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size != 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_439"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_439_1" aria-expanded="false" aria-controls="job_list___sub_collapse_439_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_439_1"><button class="btn btn-outline-danger"><span class="job_id">439 : Job ID d958bc9e494743628823bd03a466b5ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_439_1" data-parent="#job_list___sub_accordion_439" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_439_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 28), end pos: (263, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size &lt;= 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_440"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_440_1" aria-expanded="false" aria-controls="job_list___sub_collapse_440_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_440_1"><button class="btn btn-outline-danger"><span class="job_id">440 : Job ID 581460d20af84a019aa05d1e678787b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_440_1" data-parent="#job_list___sub_accordion_440" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_440_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 28), end pos: (263, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size &gt; 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_441"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_441_1" aria-expanded="false" aria-controls="job_list___sub_collapse_441_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_441_1"><button class="btn btn-outline-danger"><span class="job_id">441 : Job ID ab08928272e84e46929a3710837f6acb</span></button></div></a><div aria-labelledby="job_list___sub_heading_441_1" data-parent="#job_list___sub_accordion_441" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_441_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 28), end pos: (263, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size &gt;= 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_442"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_442_1" aria-expanded="false" aria-controls="job_list___sub_collapse_442_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_442_1"><button class="btn btn-outline-danger"><span class="job_id">442 : Job ID 52b6a552131544ffa6a7a821310a0ca4</span></button></div></a><div aria-labelledby="job_list___sub_heading_442_1" data-parent="#job_list___sub_accordion_442" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_442_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value == b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_443"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_443_1" aria-expanded="false" aria-controls="job_list___sub_collapse_443_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_443_1"><button class="btn btn-outline-danger"><span class="job_id">443 : Job ID 5bc9f2c1548841a6a3d951b7c423a5c3</span></button></div></a><div aria-labelledby="job_list___sub_heading_443_1" data-parent="#job_list___sub_accordion_443" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_443_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value != b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_444"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_444_1" aria-expanded="false" aria-controls="job_list___sub_collapse_444_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_444_1"><button class="btn btn-outline-danger"><span class="job_id">444 : Job ID b936ec2ed4714e1a9d7d895d83118d78</span></button></div></a><div aria-labelledby="job_list___sub_heading_444_1" data-parent="#job_list___sub_accordion_444" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_444_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value &lt; b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_445"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_445_1" aria-expanded="false" aria-controls="job_list___sub_collapse_445_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_445_1"><button class="btn btn-outline-danger"><span class="job_id">445 : Job ID 7dcd1ec43a344626845c8e97ec5ea103</span></button></div></a><div aria-labelledby="job_list___sub_heading_445_1" data-parent="#job_list___sub_accordion_445" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_445_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value &gt; b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_446"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_446_1" aria-expanded="false" aria-controls="job_list___sub_collapse_446_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_446_1"><button class="btn btn-outline-danger"><span class="job_id">446 : Job ID f0f7725080514a1bab6775abd04640ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_446_1" data-parent="#job_list___sub_accordion_446" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_446_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value &gt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_447"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_447_1" aria-expanded="false" aria-controls="job_list___sub_collapse_447_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_447_1"><button class="btn btn-outline-danger"><span class="job_id">447 : Job ID 36777390f5874f32b2dbdade93ebe356</span></button></div></a><div aria-labelledby="job_list___sub_heading_447_1" data-parent="#job_list___sub_accordion_447" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_447_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value is b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_448"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_448_1" aria-expanded="false" aria-controls="job_list___sub_collapse_448_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_448_1"><button class="btn btn-outline-danger"><span class="job_id">448 : Job ID fb0380dfb4f345ebb6c61b3c7591b263</span></button></div></a><div aria-labelledby="job_list___sub_heading_448_1" data-parent="#job_list___sub_accordion_448" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_448_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 21), end pos: (71, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if value is not b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_449"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_449_1" aria-expanded="false" aria-controls="job_list___sub_collapse_449_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_449_1"><button class="btn btn-outline-danger"><span class="job_id">449 : Job ID 377a9a513c904b75b5ead02454a8569b</span></button></div></a><div aria-labelledby="job_list___sub_heading_449_1" data-parent="#job_list___sub_accordion_449" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_449_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 12), end pos: (263, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is not None or size &lt; 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_450"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_450_1" aria-expanded="false" aria-controls="job_list___sub_collapse_450_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_450_1"><button class="btn btn-outline-success"><span class="job_id">450 : Job ID 96a0136b52194c198f8061e4563a7dc9</span></button></div></a><div aria-labelledby="job_list___sub_heading_450_1" data-parent="#job_list___sub_accordion_450" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_450_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (37, 11), end pos: (37, 53)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -34,7 +34,7 @@ label_names: tuple[str, ...] def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: - if len(label_values) != len(self.label_names): # defensive + if not len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) self.values[key] = self.values.get(key, 0.0) + amount</pre></div><div class="alert alert-secondary"><pre class="diff">..FF.....FF............................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:288: in login inc_login_success() observability.py:276: in inc_login_success LOGIN_SUCCESSES.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_login_successes_total', help='Successful logins', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if not len(label_values) != len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if not len(label_values) != len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1115: in create_watermark inc_watermark_created(method) observability.py:281: in inc_watermark_created WATERMARK_CREATED.inc(method) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_watermarks_created_total', help='Watermarks created', values={}, label_names=('method',)) amount = 1.0, label_values = ('robust-xmp',) def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if not len(label_values) != len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:411: in upload_document inc_upload(int(row.size)) observability.py:301: in inc_upload UPLOADS.inc() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = CounterMetric(name='tatou_uploads_total', help='Number of PDF uploads', values={}, label_names=()) amount = 1.0, label_values = () def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: if not len(label_values) != len(self.label_names): # defensive &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:38: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:149 before_request instrumentation failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - ValueError: Label c... FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 4 failed, 38 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_451"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_451_1" aria-expanded="false" aria-controls="job_list___sub_collapse_451_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_451_1"><button class="btn btn-outline-success"><span class="job_id">451 : Job ID c22bbba92f8747ed839403ee6c639e4f</span></button></div></a><div aria-labelledby="job_list___sub_heading_451_1" data-parent="#job_list___sub_accordion_451" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_451_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=65" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (65, 11), end pos: (65, 53)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -62,7 +62,7 @@ sums: dict[tuple[str, ...], float] def observe(self, value: float, *label_values: str) -&gt; None: - if len(label_values) != len(self.label_names): + if not len(label_values) != len(self.label_names): raise ValueError("Label cardinality mismatch") labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.....FF............................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:236 Database error in create_user: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:284: in login observe_db_latency("login_select", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.1065375804901123, label_values = ('login_select',) def observe(self, value: float, *label_values: str) -&gt; None: if not len(label_values) != len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.06609392166137695, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if not len(label_values) != len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Label cardinality mismatch WARNING server:server.py:160 after_request instrumentation failed: Label cardinality mismatch __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:401: in upload_document observe_db_latency("insert_document", time.time() - start_db) observability.py:317: in observe_db_latency DB_QUERY_LATENCY.observe(duration, op) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = HistogramMetric(name='tatou_db_query_duration_seconds', help='Duration of DB operations (best-effort manual instrument...n)', label_names=('operation',), buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}) value = 0.03454089164733887, label_values = ('insert_document',) def observe(self, value: float, *label_values: str) -&gt; None: if not len(label_values) != len(self.label_names): &gt; raise ValueError("Label cardinality mismatch") E ValueError: Label cardinality mismatch observability.py:66: ValueError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:147 Request size capture failed: Label cardinality mismatch ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - ValueError: Label cardinality ... FAILED ..\test\test_api.py::test_upload_document_route - ValueError: Label ca... FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - ValueError: Label car... 5 failed, 37 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_452"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_452_1" aria-expanded="false" aria-controls="job_list___sub_collapse_452_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_452_1"><button class="btn btn-outline-success"><span class="job_id">452 : Job ID f60e52a82d04415ca92e07b6d451c3aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_452_1" data-parent="#job_list___sub_accordion_452" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_452_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=71" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (71, 15), end pos: (71, 25)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -68,7 +68,7 @@ # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: - if value &lt;= b: + if not value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf"))</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165640621713Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165641478240Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_453"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_453_1" aria-expanded="false" aria-controls="job_list___sub_collapse_453_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_453_1"><button class="btn btn-outline-danger"><span class="job_id">453 : Job ID 40f4bcd70a17436bbc84e9b81b4a6335</span></button></div></a><div aria-labelledby="job_list___sub_heading_453_1" data-parent="#job_list___sub_accordion_453" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_453_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=253" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (253, 11), end pos: (253, 35)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -250,7 +250,7 @@ REQUEST_LATENCY.observe(duration, method, route) # decrement in-flight if previously incremented key = (route,) - if INFLIGHT.values.get(key): + if not INFLIGHT.values.get(key): INFLIGHT.values[key] -= 1 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_454"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_454_1" aria-expanded="false" aria-controls="job_list___sub_collapse_454_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_454_1"><button class="btn btn-outline-danger"><span class="job_id">454 : Job ID 4619bb02c5614460b0babc0fa856d7ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_454_1" data-parent="#job_list___sub_accordion_454" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_454_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 7), end pos: (263, 31)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if not size is None or size &lt; 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_455"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_455_1" aria-expanded="false" aria-controls="job_list___sub_collapse_455_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_455_1"><button class="btn btn-outline-success"><span class="job_id">455 : Job ID 36c181aa9c884c66913c6f41c77266eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_455_1" data-parent="#job_list___sub_accordion_455" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_455_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=28" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (28, 17), end pos: (28, 21)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -25,7 +25,7 @@ from time import time -@dataclass(slots=True) +@dataclass(slots=False) class CounterMetric: name: str help: str</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T130132707529Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T130133575951Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_456"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_456_1" aria-expanded="false" aria-controls="job_list___sub_collapse_456_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_456_1"><button class="btn btn-outline-danger"><span class="job_id">456 : Job ID 934738492e18465bb6b47e3edd1aa6b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_456_1" data-parent="#job_list___sub_accordion_456" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_456_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (47, 65), end pos: (47, 69)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -44,7 +44,7 @@ for labels, value in sorted(self.values.items()): label_frag = ",".join( f"{k}={_quote(v)}" - for k, v in zip(self.label_names, labels, strict=True) + for k, v in zip(self.label_names, labels, strict=False) ) lines.append(f"{self.name}{{{label_frag}}} {value}") return "\n".join(lines)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_457"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_457_1" aria-expanded="false" aria-controls="job_list___sub_collapse_457_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_457_1"><button class="btn btn-outline-danger"><span class="job_id">457 : Job ID 76ebe8ed00d143a4a2c731b0a2455e2e</span></button></div></a><div aria-labelledby="job_list___sub_heading_457_1" data-parent="#job_list___sub_accordion_457" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_457_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=53" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (53, 17), end pos: (53, 21)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -50,7 +50,7 @@ return "\n".join(lines) -@dataclass(slots=True) +@dataclass(slots=False) class HistogramMetric: name: str help: str</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_458"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_458_1" aria-expanded="false" aria-controls="job_list___sub_collapse_458_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_458_1"><button class="btn btn-outline-danger"><span class="job_id">458 : Job ID 7ed6ef520cbe4c55a23b31f60dcc03cf</span></button></div></a><div aria-labelledby="job_list___sub_heading_458_1" data-parent="#job_list___sub_accordion_458" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_458_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=89" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (89, 65), end pos: (89, 69)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -86,7 +86,7 @@ for labels in label_sets: label_frag = ",".join( f"{k}={_quote(v)}" - for k, v in zip(self.label_names, labels, strict=True) + for k, v in zip(self.label_names, labels, strict=False) ) # Emit stored cumulative counts for each finite bucket for b in self.buckets:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_459"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_459_1" aria-expanded="false" aria-controls="job_list___sub_collapse_459_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_459_1"><button class="btn btn-outline-danger"><span class="job_id">459 : Job ID 1d6cb4783d304dadae6c5c2fbba73a15</span></button></div></a><div aria-labelledby="job_list___sub_heading_459_1" data-parent="#job_list___sub_accordion_459" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_459_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=333" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (333, 15), end pos: (333, 20)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -330,5 +330,5 @@ def __exit__(self): self.elapsed = time() - self._start - return False - + return True +</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_460"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_460_1" aria-expanded="false" aria-controls="job_list___sub_collapse_460_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_460_1"><button class="btn btn-outline-danger"><span class="job_id">460 : Job ID e007d51b030d40f494878066289babdc</span></button></div></a><div aria-labelledby="job_list___sub_heading_460_1" data-parent="#job_list___sub_accordion_460" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_460_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 20), end pos: (263, 22)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None and size &lt; 0: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_461"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_461_1" aria-expanded="false" aria-controls="job_list___sub_collapse_461_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_461_1"><button class="btn btn-outline-success"><span class="job_id">461 : Job ID 7342ff065c4744cd922d8c6f9806a984</span></button></div></a><div aria-labelledby="job_list___sub_heading_461_1" data-parent="#job_list___sub_accordion_461" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_461_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=36" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (36, 54), end pos: (36, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -33,7 +33,7 @@ values: dict[tuple[str, ...], float] label_names: tuple[str, ...] - def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: + def inc(self, *label_values: str, amount: float = 2.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214847926228Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214848768689Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_462"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_462_1" aria-expanded="false" aria-controls="job_list___sub_collapse_462_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_462_1"><button class="btn btn-outline-success"><span class="job_id">462 : Job ID e27a1068fd564f6dbd0a7b8051a965ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_462_1" data-parent="#job_list___sub_accordion_462" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_462_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=36" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (36, 54), end pos: (36, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -33,7 +33,7 @@ values: dict[tuple[str, ...], float] label_names: tuple[str, ...] - def inc(self, *label_values: str, amount: float = 1.0) -&gt; None: + def inc(self, *label_values: str, amount: float = 0.0) -&gt; None: if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182304030145Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182304843246Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_463"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_463_1" aria-expanded="false" aria-controls="job_list___sub_collapse_463_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_463_1"><button class="btn btn-outline-danger"><span class="job_id">463 : Job ID 3639b7833ca949eaae513251c0eed0a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_463_1" data-parent="#job_list___sub_accordion_463" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_463_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 48), end pos: (40, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, 1.0) + amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_464"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_464_1" aria-expanded="false" aria-controls="job_list___sub_collapse_464_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_464_1"><button class="btn btn-outline-danger"><span class="job_id">464 : Job ID aaca329eb0604449aac1645aa39cc003</span></button></div></a><div aria-labelledby="job_list___sub_heading_464_1" data-parent="#job_list___sub_accordion_464" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_464_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (40, 48), end pos: (40, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -37,7 +37,7 @@ if len(label_values) != len(self.label_names): # defensive raise ValueError("Label cardinality mismatch") key = tuple(label_values) - self.values[key] = self.values.get(key, 0.0) + amount + self.values[key] = self.values.get(key, -1.0) + amount def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_465"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_465_1" aria-expanded="false" aria-controls="job_list___sub_collapse_465_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_465_1"><button class="btn btn-outline-danger"><span class="job_id">465 : Job ID a2078ff0961047ad81386f5eb212686a</span></button></div></a><div aria-labelledby="job_list___sub_heading_465_1" data-parent="#job_list___sub_accordion_465" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_465_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 72), end pos: (72, 73)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 1) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_466"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_466_1" aria-expanded="false" aria-controls="job_list___sub_collapse_466_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_466_1"><button class="btn btn-outline-danger"><span class="job_id">466 : Job ID e5d504333e6a4a4aa6462435e3540ea2</span></button></div></a><div aria-labelledby="job_list___sub_heading_466_1" data-parent="#job_list___sub_accordion_466" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_466_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 72), end pos: (72, 73)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), -1) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_467"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_467_1" aria-expanded="false" aria-controls="job_list___sub_collapse_467_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_467_1"><button class="btn btn-outline-danger"><span class="job_id">467 : Job ID cd97e9fed8be4502b534991971ea7d51</span></button></div></a><div aria-labelledby="job_list___sub_heading_467_1" data-parent="#job_list___sub_accordion_467" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_467_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 77), end pos: (72, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 2 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_468"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_468_1" aria-expanded="false" aria-controls="job_list___sub_collapse_468_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_468_1"><button class="btn btn-outline-danger"><span class="job_id">468 : Job ID 5371fef419ac4a08aafccb1e2b24d3af</span></button></div></a><div aria-labelledby="job_list___sub_heading_468_1" data-parent="#job_list___sub_accordion_468" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_468_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=72" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (72, 77), end pos: (72, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -69,7 +69,7 @@ # stored counts are already cumulative (Prometheus expectation). for b in self.buckets: if value &lt;= b: - self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 + self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 0 # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_469"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_469_1" aria-expanded="false" aria-controls="job_list___sub_collapse_469_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_469_1"><button class="btn btn-outline-danger"><span class="job_id">469 : Job ID 55d20f5824424608825ffb37fed55fe0</span></button></div></a><div aria-labelledby="job_list___sub_heading_469_1" data-parent="#job_list___sub_accordion_469" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_469_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 56), end pos: (75, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 1) + 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_470"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_470_1" aria-expanded="false" aria-controls="job_list___sub_collapse_470_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_470_1"><button class="btn btn-outline-danger"><span class="job_id">470 : Job ID 6ccb36992104433585e28187ed01dec4</span></button></div></a><div aria-labelledby="job_list___sub_heading_470_1" data-parent="#job_list___sub_accordion_470" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_470_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 56), end pos: (75, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, -1) + 1 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_471"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_471_1" aria-expanded="false" aria-controls="job_list___sub_collapse_471_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_471_1"><button class="btn btn-outline-danger"><span class="job_id">471 : Job ID 8197c3a05bb747b58a19116b508a8115</span></button></div></a><div aria-labelledby="job_list___sub_heading_471_1" data-parent="#job_list___sub_accordion_471" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_471_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 61), end pos: (75, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) + 2 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_472"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_472_1" aria-expanded="false" aria-controls="job_list___sub_collapse_472_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_472_1"><button class="btn btn-outline-danger"><span class="job_id">472 : Job ID 5fa02ada5fb0460d95aac3ed77d4bd1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_472_1" data-parent="#job_list___sub_accordion_472" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_472_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=75" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (75, 61), end pos: (75, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -72,7 +72,7 @@ self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count inf_key = (labels, float("inf")) - self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 + self.counts[inf_key] = self.counts.get(inf_key, 0) + 0 self.sums[labels] = self.sums.get(labels, 0.0) + value def render(self) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_473"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_473_1" aria-expanded="false" aria-controls="job_list___sub_collapse_473_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_473_1"><button class="btn btn-outline-danger"><span class="job_id">473 : Job ID 54652f5dfb804675852af3645d16b403</span></button></div></a><div aria-labelledby="job_list___sub_heading_473_1" data-parent="#job_list___sub_accordion_473" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_473_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 50), end pos: (76, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, 1.0) + value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_474"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_474_1" aria-expanded="false" aria-controls="job_list___sub_collapse_474_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_474_1"><button class="btn btn-outline-danger"><span class="job_id">474 : Job ID e5b8c8e05cfb4c64813392cbd46721f9</span></button></div></a><div aria-labelledby="job_list___sub_heading_474_1" data-parent="#job_list___sub_accordion_474" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_474_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (76, 50), end pos: (76, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -73,7 +73,7 @@ # Always increment +Inf bucket count inf_key = (labels, float("inf")) self.counts[inf_key] = self.counts.get(inf_key, 0) + 1 - self.sums[labels] = self.sums.get(labels, 0.0) + value + self.sums[labels] = self.sums.get(labels, -1.0) + value def render(self) -&gt; str: # Prometheus histogram:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_475"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_475_1" aria-expanded="false" aria-controls="job_list___sub_collapse_475_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_475_1"><button class="btn btn-outline-danger"><span class="job_id">475 : Job ID a0c466d9e3b0424b8fa9ef8788416a72</span></button></div></a><div aria-labelledby="job_list___sub_heading_475_1" data-parent="#job_list___sub_accordion_475" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_475_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (93, 49), end pos: (93, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -90,7 +90,7 @@ ) # Emit stored cumulative counts for each finite bucket for b in self.buckets: - c = self.counts.get((labels, b), 0) + c = self.counts.get((labels, b), 1) lines.append( f"{self.name}_bucket{{{label_frag},le={_quote(repr(b))}}} {c}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_476"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_476_1" aria-expanded="false" aria-controls="job_list___sub_collapse_476_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_476_1"><button class="btn btn-outline-danger"><span class="job_id">476 : Job ID 83fd6de602f64e7e8686b99070447905</span></button></div></a><div aria-labelledby="job_list___sub_heading_476_1" data-parent="#job_list___sub_accordion_476" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_476_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (93, 49), end pos: (93, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -90,7 +90,7 @@ ) # Emit stored cumulative counts for each finite bucket for b in self.buckets: - c = self.counts.get((labels, b), 0) + c = self.counts.get((labels, b), -1) lines.append( f"{self.name}_bucket{{{label_frag},le={_quote(repr(b))}}} {c}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_477"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_477_1" aria-expanded="false" aria-controls="job_list___sub_collapse_477_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_477_1"><button class="btn btn-outline-danger"><span class="job_id">477 : Job ID 0033cfca5b2c4952b589c978f465946b</span></button></div></a><div aria-labelledby="job_list___sub_heading_477_1" data-parent="#job_list___sub_accordion_477" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_477_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (98, 60), end pos: (98, 61)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -95,7 +95,7 @@ f"{self.name}_bucket{{{label_frag},le={_quote(repr(b))}}} {c}" ) # +Inf bucket / total - total = self.counts.get((labels, float("inf")), 0) + total = self.counts.get((labels, float("inf")), 1) lines.append( f"{self.name}_bucket{{{label_frag},le={_quote('+Inf')}}} {total}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_478"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_478_1" aria-expanded="false" aria-controls="job_list___sub_collapse_478_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_478_1"><button class="btn btn-outline-danger"><span class="job_id">478 : Job ID bb79fe0e6d604e28b782c6eea9960dd9</span></button></div></a><div aria-labelledby="job_list___sub_heading_478_1" data-parent="#job_list___sub_accordion_478" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_478_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=98" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (98, 60), end pos: (98, 61)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -95,7 +95,7 @@ f"{self.name}_bucket{{{label_frag},le={_quote(repr(b))}}} {c}" ) # +Inf bucket / total - total = self.counts.get((labels, float("inf")), 0) + total = self.counts.get((labels, float("inf")), -1) lines.append( f"{self.name}_bucket{{{label_frag},le={_quote('+Inf')}}} {total}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_479"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_479_1" aria-expanded="false" aria-controls="job_list___sub_collapse_479_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_479_1"><button class="btn btn-outline-danger"><span class="job_id">479 : Job ID 9b938913e3c44289a6ddb7216add357c</span></button></div></a><div aria-labelledby="job_list___sub_heading_479_1" data-parent="#job_list___sub_accordion_479" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_479_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=103" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (103, 73), end pos: (103, 76)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -100,7 +100,7 @@ f"{self.name}_bucket{{{label_frag},le={_quote('+Inf')}}} {total}" ) lines.append( - f"{self.name}_sum{{{label_frag}}} {self.sums.get(labels, 0.0)}" + f"{self.name}_sum{{{label_frag}}} {self.sums.get(labels, 1.0)}" ) lines.append(f"{self.name}_count{{{label_frag}}} {total}") return "\n".join(lines)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_480"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_480_1" aria-expanded="false" aria-controls="job_list___sub_collapse_480_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_480_1"><button class="btn btn-outline-danger"><span class="job_id">480 : Job ID 00fb5e4eaa0e44da912c876272ff89c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_480_1" data-parent="#job_list___sub_accordion_480" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_480_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=103" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (103, 73), end pos: (103, 76)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -100,7 +100,7 @@ f"{self.name}_bucket{{{label_frag},le={_quote('+Inf')}}} {total}" ) lines.append( - f"{self.name}_sum{{{label_frag}}} {self.sums.get(labels, 0.0)}" + f"{self.name}_sum{{{label_frag}}} {self.sums.get(labels, -1.0)}" ) lines.append(f"{self.name}_count{{{label_frag}}} {total}") return "\n".join(lines)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_481"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_481_1" aria-expanded="false" aria-controls="job_list___sub_collapse_481_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_481_1"><button class="btn btn-outline-danger"><span class="job_id">481 : Job ID 37bd53039fa647079243f42c798b8c6c</span></button></div></a><div aria-labelledby="job_list___sub_heading_481_1" data-parent="#job_list___sub_accordion_481" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_481_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 13), end pos: (126, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=( 1.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_482"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_482_1" aria-expanded="false" aria-controls="job_list___sub_collapse_482_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_482_1"><button class="btn btn-outline-danger"><span class="job_id">482 : Job ID 742e2792ba2d4677bdffac86a25ef7e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_482_1" data-parent="#job_list___sub_accordion_482" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_482_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 13), end pos: (126, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=( -0.995, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_483"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_483_1" aria-expanded="false" aria-controls="job_list___sub_collapse_483_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_483_1"><button class="btn btn-outline-danger"><span class="job_id">483 : Job ID ae91e1d7a58d421a9cf7e129d5661107</span></button></div></a><div aria-labelledby="job_list___sub_heading_483_1" data-parent="#job_list___sub_accordion_483" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_483_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 20), end pos: (126, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 1.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_484"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_484_1" aria-expanded="false" aria-controls="job_list___sub_collapse_484_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_484_1"><button class="btn btn-outline-danger"><span class="job_id">484 : Job ID 9d9410fece714140b66ab7008920651e</span></button></div></a><div aria-labelledby="job_list___sub_heading_484_1" data-parent="#job_list___sub_accordion_484" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_484_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 20), end pos: (126, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, -0.99, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_485"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_485_1" aria-expanded="false" aria-controls="job_list___sub_collapse_485_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_485_1"><button class="btn btn-outline-danger"><span class="job_id">485 : Job ID 00c88962f3674a1484dbc94a4adba17a</span></button></div></a><div aria-labelledby="job_list___sub_heading_485_1" data-parent="#job_list___sub_accordion_485" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_485_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 26), end pos: (126, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 1.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_486"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_486_1" aria-expanded="false" aria-controls="job_list___sub_collapse_486_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_486_1"><button class="btn btn-outline-danger"><span class="job_id">486 : Job ID bda07dcdb1214151ba30408780e446bd</span></button></div></a><div aria-labelledby="job_list___sub_heading_486_1" data-parent="#job_list___sub_accordion_486" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_486_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 26), end pos: (126, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, -0.975, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_487"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_487_1" aria-expanded="false" aria-controls="job_list___sub_collapse_487_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_487_1"><button class="btn btn-outline-danger"><span class="job_id">487 : Job ID a01f156bdc614eef8b5b7b7e842b2038</span></button></div></a><div aria-labelledby="job_list___sub_heading_487_1" data-parent="#job_list___sub_accordion_487" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_487_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 33), end pos: (126, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 1.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_488"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_488_1" aria-expanded="false" aria-controls="job_list___sub_collapse_488_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_488_1"><button class="btn btn-outline-danger"><span class="job_id">488 : Job ID a6575193031d470eb32fdc167c41998f</span></button></div></a><div aria-labelledby="job_list___sub_heading_488_1" data-parent="#job_list___sub_accordion_488" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_488_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 33), end pos: (126, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, -0.95, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_489"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_489_1" aria-expanded="false" aria-controls="job_list___sub_collapse_489_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_489_1"><button class="btn btn-outline-success"><span class="job_id">489 : Job ID 7d596b8730034e399dd50fa5ef3c92fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_489_1" data-parent="#job_list___sub_accordion_489" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_489_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 39), end pos: (126, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 1.1, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123658305662Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123659207858Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_490"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_490_1" aria-expanded="false" aria-controls="job_list___sub_collapse_490_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_490_1"><button class="btn btn-outline-danger"><span class="job_id">490 : Job ID 002a9793aa344bd1b4ae3e3c35bbff6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_490_1" data-parent="#job_list___sub_accordion_490" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_490_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 39), end pos: (126, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, -0.9, 0.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_491"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_491_1" aria-expanded="false" aria-controls="job_list___sub_collapse_491_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_491_1"><button class="btn btn-outline-danger"><span class="job_id">491 : Job ID 3e071a167a4c4277a559bed05f8da4d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_491_1" data-parent="#job_list___sub_accordion_491" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_491_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 44), end pos: (126, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 1.25, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_492"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_492_1" aria-expanded="false" aria-controls="job_list___sub_collapse_492_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_492_1"><button class="btn btn-outline-danger"><span class="job_id">492 : Job ID 6a015decc0d643eea1e8678fa4488c5f</span></button></div></a><div aria-labelledby="job_list___sub_heading_492_1" data-parent="#job_list___sub_accordion_492" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_492_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 44), end pos: (126, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, -0.75, 0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_493"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_493_1" aria-expanded="false" aria-controls="job_list___sub_collapse_493_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_493_1"><button class="btn btn-outline-danger"><span class="job_id">493 : Job ID b53be7f434ef4e39be426288ed8d0a57</span></button></div></a><div aria-labelledby="job_list___sub_heading_493_1" data-parent="#job_list___sub_accordion_493" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_493_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 50), end pos: (126, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 1.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_494"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_494_1" aria-expanded="false" aria-controls="job_list___sub_collapse_494_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_494_1"><button class="btn btn-outline-danger"><span class="job_id">494 : Job ID e95af3b6eb884e81934545cdae7ec48c</span></button></div></a><div aria-labelledby="job_list___sub_heading_494_1" data-parent="#job_list___sub_accordion_494" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_494_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 50), end pos: (126, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, -0.5, 1.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_495"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_495_1" aria-expanded="false" aria-controls="job_list___sub_collapse_495_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_495_1"><button class="btn btn-outline-danger"><span class="job_id">495 : Job ID 81e60aeea8404504a046af1e4e3671af</span></button></div></a><div aria-labelledby="job_list___sub_heading_495_1" data-parent="#job_list___sub_accordion_495" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_495_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 55), end pos: (126, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 2.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_496"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_496_1" aria-expanded="false" aria-controls="job_list___sub_collapse_496_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_496_1"><button class="btn btn-outline-danger"><span class="job_id">496 : Job ID 5b1062f1f2054cb5a1ac7045f2fb5c2e</span></button></div></a><div aria-labelledby="job_list___sub_heading_496_1" data-parent="#job_list___sub_accordion_496" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_496_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 55), end pos: (126, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 0.0, 2.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_497"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_497_1" aria-expanded="false" aria-controls="job_list___sub_collapse_497_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_497_1"><button class="btn btn-outline-danger"><span class="job_id">497 : Job ID 9b7e8c1bba9548a0ad4838fc2d0ff5ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_497_1" data-parent="#job_list___sub_accordion_497" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_497_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 60), end pos: (126, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 3.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_498"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_498_1" aria-expanded="false" aria-controls="job_list___sub_collapse_498_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_498_1"><button class="btn btn-outline-danger"><span class="job_id">498 : Job ID 046ab72e02e04207b86b25e604cb2910</span></button></div></a><div aria-labelledby="job_list___sub_heading_498_1" data-parent="#job_list___sub_accordion_498" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_498_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 60), end pos: (126, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 1.5, 5.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_499"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_499_1" aria-expanded="false" aria-controls="job_list___sub_collapse_499_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_499_1"><button class="btn btn-outline-danger"><span class="job_id">499 : Job ID 7afba7b7335c4e22ba7c3ae8a00bfc3f</span></button></div></a><div aria-labelledby="job_list___sub_heading_499_1" data-parent="#job_list___sub_accordion_499" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_499_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 65), end pos: (126, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 6.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_500"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_500_1" aria-expanded="false" aria-controls="job_list___sub_collapse_500_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_500_1"><button class="btn btn-outline-danger"><span class="job_id">500 : Job ID 567cf629080b499d940330670d5db5f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_500_1" data-parent="#job_list___sub_accordion_500" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_500_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=126" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (126, 65), end pos: (126, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -123,7 +123,7 @@ name="tatou_http_request_duration_seconds", help="Latency in seconds of HTTP requests", label_names=("method", "route"), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 4.0), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_501"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_501_1" aria-expanded="false" aria-controls="job_list___sub_collapse_501_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_501_1"><button class="btn btn-outline-danger"><span class="job_id">501 : Job ID 6799359d4e554130a1480b344c3b3480</span></button></div></a><div aria-labelledby="job_list___sub_heading_501_1" data-parent="#job_list___sub_accordion_501" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_501_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 13), end pos: (194, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=( 1.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_502"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_502_1" aria-expanded="false" aria-controls="job_list___sub_collapse_502_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_502_1"><button class="btn btn-outline-danger"><span class="job_id">502 : Job ID 2e4483a437c64ce6b8b3a6ffe910b08b</span></button></div></a><div aria-labelledby="job_list___sub_heading_502_1" data-parent="#job_list___sub_accordion_502" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_502_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 13), end pos: (194, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=( -0.999, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_503"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_503_1" aria-expanded="false" aria-controls="job_list___sub_collapse_503_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_503_1"><button class="btn btn-outline-danger"><span class="job_id">503 : Job ID a404a2891ae3412dadcc6a0d4859b948</span></button></div></a><div aria-labelledby="job_list___sub_heading_503_1" data-parent="#job_list___sub_accordion_503" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_503_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 20), end pos: (194, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 1.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_504"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_504_1" aria-expanded="false" aria-controls="job_list___sub_collapse_504_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_504_1"><button class="btn btn-outline-success"><span class="job_id">504 : Job ID ee479505b1da4bbbb41b81503dc72c6f</span></button></div></a><div aria-labelledby="job_list___sub_heading_504_1" data-parent="#job_list___sub_accordion_504" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_504_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 20), end pos: (194, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, -0.995, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211301013747Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211301867012Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_505"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_505_1" aria-expanded="false" aria-controls="job_list___sub_collapse_505_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_505_1"><button class="btn btn-outline-danger"><span class="job_id">505 : Job ID 48a056be135740fab567ec3afe476c0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_505_1" data-parent="#job_list___sub_accordion_505" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_505_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 27), end pos: (194, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 1.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_506"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_506_1" aria-expanded="false" aria-controls="job_list___sub_collapse_506_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_506_1"><button class="btn btn-outline-danger"><span class="job_id">506 : Job ID dd619579677e409d9a8113109ed0900c</span></button></div></a><div aria-labelledby="job_list___sub_heading_506_1" data-parent="#job_list___sub_accordion_506" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_506_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 27), end pos: (194, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, -0.99, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_507"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_507_1" aria-expanded="false" aria-controls="job_list___sub_collapse_507_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_507_1"><button class="btn btn-outline-danger"><span class="job_id">507 : Job ID daecb73658e34d268a7a707fa3e60e27</span></button></div></a><div aria-labelledby="job_list___sub_heading_507_1" data-parent="#job_list___sub_accordion_507" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_507_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 33), end pos: (194, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 1.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_508"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_508_1" aria-expanded="false" aria-controls="job_list___sub_collapse_508_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_508_1"><button class="btn btn-outline-danger"><span class="job_id">508 : Job ID 70671841147e4cdfa965102437bfd6b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_508_1" data-parent="#job_list___sub_accordion_508" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_508_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 33), end pos: (194, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 47</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, -0.975, 0.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_509"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_509_1" aria-expanded="false" aria-controls="job_list___sub_collapse_509_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_509_1"><button class="btn btn-outline-danger"><span class="job_id">509 : Job ID b41a7c66bbc54b1b81dcf982eae4828e</span></button></div></a><div aria-labelledby="job_list___sub_heading_509_1" data-parent="#job_list___sub_accordion_509" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_509_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 40), end pos: (194, 44)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 48</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 1.05, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_510"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_510_1" aria-expanded="false" aria-controls="job_list___sub_collapse_510_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_510_1"><button class="btn btn-outline-danger"><span class="job_id">510 : Job ID 5ef923a9989241c0a6b005fab5a11fc9</span></button></div></a><div aria-labelledby="job_list___sub_heading_510_1" data-parent="#job_list___sub_accordion_510" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_510_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 40), end pos: (194, 44)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 49</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, -0.95, 0.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_511"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_511_1" aria-expanded="false" aria-controls="job_list___sub_collapse_511_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_511_1"><button class="btn btn-outline-danger"><span class="job_id">511 : Job ID a4d857860fff44558a6d3c99a346a8f8</span></button></div></a><div aria-labelledby="job_list___sub_heading_511_1" data-parent="#job_list___sub_accordion_511" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_511_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 46), end pos: (194, 49)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 50</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 1.1, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_512"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_512_1" aria-expanded="false" aria-controls="job_list___sub_collapse_512_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_512_1"><button class="btn btn-outline-danger"><span class="job_id">512 : Job ID 67f281c6944d4ba098d7bc15aa94f527</span></button></div></a><div aria-labelledby="job_list___sub_heading_512_1" data-parent="#job_list___sub_accordion_512" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_512_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 46), end pos: (194, 49)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 51</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, -0.9, 0.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_513"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_513_1" aria-expanded="false" aria-controls="job_list___sub_collapse_513_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_513_1"><button class="btn btn-outline-danger"><span class="job_id">513 : Job ID 22ef62b49625400aa4a272abc1c4ab1b</span></button></div></a><div aria-labelledby="job_list___sub_heading_513_1" data-parent="#job_list___sub_accordion_513" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_513_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 51), end pos: (194, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 52</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 1.25, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_514"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_514_1" aria-expanded="false" aria-controls="job_list___sub_collapse_514_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_514_1"><button class="btn btn-outline-danger"><span class="job_id">514 : Job ID 09a22514f4ff4b91b3ab6444f0087a45</span></button></div></a><div aria-labelledby="job_list___sub_heading_514_1" data-parent="#job_list___sub_accordion_514" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_514_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 51), end pos: (194, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 53</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, -0.75, 0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_515"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_515_1" aria-expanded="false" aria-controls="job_list___sub_collapse_515_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_515_1"><button class="btn btn-outline-danger"><span class="job_id">515 : Job ID 38fe0afaf99748bfba9b3d5639fcdddd</span></button></div></a><div aria-labelledby="job_list___sub_heading_515_1" data-parent="#job_list___sub_accordion_515" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_515_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 57), end pos: (194, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 54</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 1.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_516"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_516_1" aria-expanded="false" aria-controls="job_list___sub_collapse_516_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_516_1"><button class="btn btn-outline-danger"><span class="job_id">516 : Job ID 9c5d1891890f438fa7ef7f19a85c8829</span></button></div></a><div aria-labelledby="job_list___sub_heading_516_1" data-parent="#job_list___sub_accordion_516" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_516_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 57), end pos: (194, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 55</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, -0.5, 1, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_517"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_517_1" aria-expanded="false" aria-controls="job_list___sub_collapse_517_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_517_1"><button class="btn btn-outline-danger"><span class="job_id">517 : Job ID 0b94d0aa4feb4310bd86a8088303f9ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_517_1" data-parent="#job_list___sub_accordion_517" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_517_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 62), end pos: (194, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 56</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 2, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_518"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_518_1" aria-expanded="false" aria-controls="job_list___sub_collapse_518_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_518_1"><button class="btn btn-outline-danger"><span class="job_id">518 : Job ID cbf7db55dee4474ca06499624f20e559</span></button></div></a><div aria-labelledby="job_list___sub_heading_518_1" data-parent="#job_list___sub_accordion_518" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_518_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 62), end pos: (194, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 57</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 0, 2.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_519"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_519_1" aria-expanded="false" aria-controls="job_list___sub_collapse_519_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_519_1"><button class="btn btn-outline-danger"><span class="job_id">519 : Job ID a874cc34cb574bf1a37b640dcdd7344a</span></button></div></a><div aria-labelledby="job_list___sub_heading_519_1" data-parent="#job_list___sub_accordion_519" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_519_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 65), end pos: (194, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 58</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 3.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_520"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_520_1" aria-expanded="false" aria-controls="job_list___sub_collapse_520_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_520_1"><button class="btn btn-outline-danger"><span class="job_id">520 : Job ID 279504788254441c875209a854385c0c</span></button></div></a><div aria-labelledby="job_list___sub_heading_520_1" data-parent="#job_list___sub_accordion_520" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_520_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (194, 65), end pos: (194, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 59</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -191,7 +191,7 @@ name="tatou_db_query_duration_seconds", help="Duration of DB operations (best-effort manual instrumentation)", label_names=("operation",), - buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5), + buckets=(0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 1.5), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_521"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_521_1" aria-expanded="false" aria-controls="job_list___sub_collapse_521_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_521_1"><button class="btn btn-outline-danger"><span class="job_id">521 : Job ID 6797958384b94950a6f72e118c60bcb5</span></button></div></a><div aria-labelledby="job_list___sub_heading_521_1" data-parent="#job_list___sub_accordion_521" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_521_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 13), end pos: (202, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 60</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=( 1.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_522"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_522_1" aria-expanded="false" aria-controls="job_list___sub_collapse_522_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_522_1"><button class="btn btn-outline-success"><span class="job_id">522 : Job ID 7b8cc2fcc3754c4883f7b5ab8f32ca7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_522_1" data-parent="#job_list___sub_accordion_522" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_522_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 13), end pos: (202, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 61</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=( -0.995, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193622825847Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193623709563Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_523"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_523_1" aria-expanded="false" aria-controls="job_list___sub_collapse_523_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_523_1"><button class="btn btn-outline-danger"><span class="job_id">523 : Job ID f2dfb17a7f8e43b99d3e5fc3a1944ab4</span></button></div></a><div aria-labelledby="job_list___sub_heading_523_1" data-parent="#job_list___sub_accordion_523" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_523_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 20), end pos: (202, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 62</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 1.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_524"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_524_1" aria-expanded="false" aria-controls="job_list___sub_collapse_524_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_524_1"><button class="btn btn-outline-danger"><span class="job_id">524 : Job ID eb217d3914224fcfb95441acd16c7c15</span></button></div></a><div aria-labelledby="job_list___sub_heading_524_1" data-parent="#job_list___sub_accordion_524" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_524_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 20), end pos: (202, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 63</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, -0.99, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_525"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_525_1" aria-expanded="false" aria-controls="job_list___sub_collapse_525_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_525_1"><button class="btn btn-outline-danger"><span class="job_id">525 : Job ID 7d61bec155414939b12c278224faeb67</span></button></div></a><div aria-labelledby="job_list___sub_heading_525_1" data-parent="#job_list___sub_accordion_525" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_525_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 26), end pos: (202, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 64</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 1.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_526"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_526_1" aria-expanded="false" aria-controls="job_list___sub_collapse_526_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_526_1"><button class="btn btn-outline-danger"><span class="job_id">526 : Job ID 9131e2b7ad7947409c7a4a89193b6221</span></button></div></a><div aria-labelledby="job_list___sub_heading_526_1" data-parent="#job_list___sub_accordion_526" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_526_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 26), end pos: (202, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 65</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, -0.975, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_527"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_527_1" aria-expanded="false" aria-controls="job_list___sub_collapse_527_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_527_1"><button class="btn btn-outline-success"><span class="job_id">527 : Job ID f9fe44525946440ca56b3efa002485c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_527_1" data-parent="#job_list___sub_accordion_527" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_527_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 33), end pos: (202, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 66</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 1.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194515489132Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194516293879Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_528"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_528_1" aria-expanded="false" aria-controls="job_list___sub_collapse_528_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_528_1"><button class="btn btn-outline-danger"><span class="job_id">528 : Job ID 26ff8df3c8094bb9aa990816caccffb3</span></button></div></a><div aria-labelledby="job_list___sub_heading_528_1" data-parent="#job_list___sub_accordion_528" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_528_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 33), end pos: (202, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 67</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, -0.95, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_529"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_529_1" aria-expanded="false" aria-controls="job_list___sub_collapse_529_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_529_1"><button class="btn btn-outline-danger"><span class="job_id">529 : Job ID bf33952f3d494a4b946bfc6ec7d39568</span></button></div></a><div aria-labelledby="job_list___sub_heading_529_1" data-parent="#job_list___sub_accordion_529" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_529_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 39), end pos: (202, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 68</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 1.1, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_530"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_530_1" aria-expanded="false" aria-controls="job_list___sub_collapse_530_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_530_1"><button class="btn btn-outline-danger"><span class="job_id">530 : Job ID 6802349251f6449aaa6fcb9145c58ca0</span></button></div></a><div aria-labelledby="job_list___sub_heading_530_1" data-parent="#job_list___sub_accordion_530" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_530_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 39), end pos: (202, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 69</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, -0.9, 0.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_531"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_531_1" aria-expanded="false" aria-controls="job_list___sub_collapse_531_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_531_1"><button class="btn btn-outline-danger"><span class="job_id">531 : Job ID 1ffdb89938db4fcdaeeaa5892da05beb</span></button></div></a><div aria-labelledby="job_list___sub_heading_531_1" data-parent="#job_list___sub_accordion_531" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_531_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 44), end pos: (202, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 70</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 1.25, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_532"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_532_1" aria-expanded="false" aria-controls="job_list___sub_collapse_532_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_532_1"><button class="btn btn-outline-danger"><span class="job_id">532 : Job ID 55031d3cdb0d4db1a5508a909c92ccac</span></button></div></a><div aria-labelledby="job_list___sub_heading_532_1" data-parent="#job_list___sub_accordion_532" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_532_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 44), end pos: (202, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 71</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, -0.75, 0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_533"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_533_1" aria-expanded="false" aria-controls="job_list___sub_collapse_533_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_533_1"><button class="btn btn-outline-danger"><span class="job_id">533 : Job ID 53daedbc7b5547379fea428cdd280c59</span></button></div></a><div aria-labelledby="job_list___sub_heading_533_1" data-parent="#job_list___sub_accordion_533" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_533_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 50), end pos: (202, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 72</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 1.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_534"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_534_1" aria-expanded="false" aria-controls="job_list___sub_collapse_534_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_534_1"><button class="btn btn-outline-success"><span class="job_id">534 : Job ID 78ed5b2941a74aeeb1cfa534700a9347</span></button></div></a><div aria-labelledby="job_list___sub_heading_534_1" data-parent="#job_list___sub_accordion_534" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_534_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 50), end pos: (202, 53)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 73</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, -0.5, 1, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215034578466Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215035515394Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_535"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_535_1" aria-expanded="false" aria-controls="job_list___sub_collapse_535_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_535_1"><button class="btn btn-outline-danger"><span class="job_id">535 : Job ID 7feab7f9ec5d4b69b304053b187891d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_535_1" data-parent="#job_list___sub_accordion_535" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_535_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 55), end pos: (202, 56)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 74</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 2, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_536"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_536_1" aria-expanded="false" aria-controls="job_list___sub_collapse_536_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_536_1"><button class="btn btn-outline-danger"><span class="job_id">536 : Job ID 1d2528c94f9c498db60dd4eaf00c29b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_536_1" data-parent="#job_list___sub_accordion_536" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_536_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 55), end pos: (202, 56)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 75</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 0, 2.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_537"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_537_1" aria-expanded="false" aria-controls="job_list___sub_collapse_537_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_537_1"><button class="btn btn-outline-danger"><span class="job_id">537 : Job ID fd261375eed5417583b62ab98c422173</span></button></div></a><div aria-labelledby="job_list___sub_heading_537_1" data-parent="#job_list___sub_accordion_537" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_537_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 58), end pos: (202, 61)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 76</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 3.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_538"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_538_1" aria-expanded="false" aria-controls="job_list___sub_collapse_538_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_538_1"><button class="btn btn-outline-danger"><span class="job_id">538 : Job ID 36771fbe60fd4e689e3fc555f4dd7a24</span></button></div></a><div aria-labelledby="job_list___sub_heading_538_1" data-parent="#job_list___sub_accordion_538" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_538_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 58), end pos: (202, 61)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 77</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 1.5, 5, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_539"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_539_1" aria-expanded="false" aria-controls="job_list___sub_collapse_539_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_539_1"><button class="btn btn-outline-danger"><span class="job_id">539 : Job ID 2e39edc06e7d45709fb18cf90b6871d9</span></button></div></a><div aria-labelledby="job_list___sub_heading_539_1" data-parent="#job_list___sub_accordion_539" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_539_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 63), end pos: (202, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 78</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 6, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_540"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_540_1" aria-expanded="false" aria-controls="job_list___sub_collapse_540_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_540_1"><button class="btn btn-outline-danger"><span class="job_id">540 : Job ID 327a2a0053c7471284b6daed9c49b876</span></button></div></a><div aria-labelledby="job_list___sub_heading_540_1" data-parent="#job_list___sub_accordion_540" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_540_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 63), end pos: (202, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 79</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 4, 10), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_541"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_541_1" aria-expanded="false" aria-controls="job_list___sub_collapse_541_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_541_1"><button class="btn btn-outline-danger"><span class="job_id">541 : Job ID 0886f9e1385a41e0b87ddb576ffb9fa8</span></button></div></a><div aria-labelledby="job_list___sub_heading_541_1" data-parent="#job_list___sub_accordion_541" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_541_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 66), end pos: (202, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 80</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 11), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_542"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_542_1" aria-expanded="false" aria-controls="job_list___sub_collapse_542_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_542_1"><button class="btn btn-outline-danger"><span class="job_id">542 : Job ID 1393bb5c06ee4f318afe5d338d63889d</span></button></div></a><div aria-labelledby="job_list___sub_heading_542_1" data-parent="#job_list___sub_accordion_542" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_542_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (202, 66), end pos: (202, 68)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 81</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -199,7 +199,7 @@ name="tatou_watermark_duration_seconds", help="Duration of watermark application per method", label_names=("method",), - buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10), + buckets=(0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 9), counts={}, sums={}, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_543"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_543_1" aria-expanded="false" aria-controls="job_list___sub_collapse_543_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_543_1"><button class="btn btn-outline-danger"><span class="job_id">543 : Job ID 53fa71e01f4e4ca385faced186324e3a</span></button></div></a><div aria-labelledby="job_list___sub_heading_543_1" data-parent="#job_list___sub_accordion_543" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_543_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (211, 8), end pos: (211, 11)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 82</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -207,8 +207,7 @@ name="tatou_http_request_body_bytes", help="Request body sizes in bytes (Content-Length if present)", label_names=("method", "route"), - buckets=( - 100, + buckets=( 101, 500, 1_000, 5_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_544"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_544_1" aria-expanded="false" aria-controls="job_list___sub_collapse_544_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_544_1"><button class="btn btn-outline-danger"><span class="job_id">544 : Job ID 4f44758dc06d40a592b7c8ee7c2314f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_544_1" data-parent="#job_list___sub_accordion_544" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_544_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (211, 8), end pos: (211, 11)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 83</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -207,8 +207,7 @@ name="tatou_http_request_body_bytes", help="Request body sizes in bytes (Content-Length if present)", label_names=("method", "route"), - buckets=( - 100, + buckets=( 99, 500, 1_000, 5_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_545"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_545_1" aria-expanded="false" aria-controls="job_list___sub_collapse_545_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_545_1"><button class="btn btn-outline-danger"><span class="job_id">545 : Job ID 62732652868544c8b44f17203e41f2d6</span></button></div></a><div aria-labelledby="job_list___sub_heading_545_1" data-parent="#job_list___sub_accordion_545" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_545_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=212" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (212, 8), end pos: (212, 11)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 84</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -208,8 +208,7 @@ help="Request body sizes in bytes (Content-Length if present)", label_names=("method", "route"), buckets=( - 100, - 500, + 100, 501, 1_000, 5_000, 10_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_546"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_546_1" aria-expanded="false" aria-controls="job_list___sub_collapse_546_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_546_1"><button class="btn btn-outline-danger"><span class="job_id">546 : Job ID df030976f66444699fbe7886bebfe76e</span></button></div></a><div aria-labelledby="job_list___sub_heading_546_1" data-parent="#job_list___sub_accordion_546" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_546_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=212" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (212, 8), end pos: (212, 11)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 85</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -208,8 +208,7 @@ help="Request body sizes in bytes (Content-Length if present)", label_names=("method", "route"), buckets=( - 100, - 500, + 100, 499, 1_000, 5_000, 10_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_547"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_547_1" aria-expanded="false" aria-controls="job_list___sub_collapse_547_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_547_1"><button class="btn btn-outline-danger"><span class="job_id">547 : Job ID 0ea0912c999f4b8c9f97e016bbfdef89</span></button></div></a><div aria-labelledby="job_list___sub_heading_547_1" data-parent="#job_list___sub_accordion_547" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_547_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=213" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (213, 8), end pos: (213, 13)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 86</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -209,8 +209,7 @@ label_names=("method", "route"), buckets=( 100, - 500, - 1_000, + 500, 1001, 5_000, 10_000, 50_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_548"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_548_1" aria-expanded="false" aria-controls="job_list___sub_collapse_548_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_548_1"><button class="btn btn-outline-danger"><span class="job_id">548 : Job ID 2f7f6322ce8742069a5c976521e68552</span></button></div></a><div aria-labelledby="job_list___sub_heading_548_1" data-parent="#job_list___sub_accordion_548" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_548_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=213" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (213, 8), end pos: (213, 13)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 87</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -209,8 +209,7 @@ label_names=("method", "route"), buckets=( 100, - 500, - 1_000, + 500, 999, 5_000, 10_000, 50_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_549"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_549_1" aria-expanded="false" aria-controls="job_list___sub_collapse_549_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_549_1"><button class="btn btn-outline-danger"><span class="job_id">549 : Job ID 3616115fea2b475ab74eb3e581e6c60f</span></button></div></a><div aria-labelledby="job_list___sub_heading_549_1" data-parent="#job_list___sub_accordion_549" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_549_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (214, 8), end pos: (214, 13)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 88</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -210,8 +210,7 @@ buckets=( 100, 500, - 1_000, - 5_000, + 1_000, 5001, 10_000, 50_000, 100_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_550"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_550_1" aria-expanded="false" aria-controls="job_list___sub_collapse_550_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_550_1"><button class="btn btn-outline-danger"><span class="job_id">550 : Job ID d385af0791424ad3ab181f7177ed1cbd</span></button></div></a><div aria-labelledby="job_list___sub_heading_550_1" data-parent="#job_list___sub_accordion_550" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_550_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (214, 8), end pos: (214, 13)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 89</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -210,8 +210,7 @@ buckets=( 100, 500, - 1_000, - 5_000, + 1_000, 4999, 10_000, 50_000, 100_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_551"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_551_1" aria-expanded="false" aria-controls="job_list___sub_collapse_551_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_551_1"><button class="btn btn-outline-danger"><span class="job_id">551 : Job ID aaa0a59b3b5640819e14fd9df20c306b</span></button></div></a><div aria-labelledby="job_list___sub_heading_551_1" data-parent="#job_list___sub_accordion_551" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_551_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=215" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (215, 8), end pos: (215, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 90</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -211,8 +211,7 @@ 100, 500, 1_000, - 5_000, - 10_000, + 5_000, 10001, 50_000, 100_000, 500_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_552"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_552_1" aria-expanded="false" aria-controls="job_list___sub_collapse_552_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_552_1"><button class="btn btn-outline-danger"><span class="job_id">552 : Job ID 8e1f091ca9df4b4fbe98eb6e7872c4a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_552_1" data-parent="#job_list___sub_accordion_552" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_552_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=215" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (215, 8), end pos: (215, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 91</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -211,8 +211,7 @@ 100, 500, 1_000, - 5_000, - 10_000, + 5_000, 9999, 50_000, 100_000, 500_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_553"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_553_1" aria-expanded="false" aria-controls="job_list___sub_collapse_553_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_553_1"><button class="btn btn-outline-danger"><span class="job_id">553 : Job ID caa0b0429df44de4b473eeb18df4d12a</span></button></div></a><div aria-labelledby="job_list___sub_heading_553_1" data-parent="#job_list___sub_accordion_553" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_553_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=216" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (216, 8), end pos: (216, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 92</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -212,8 +212,7 @@ 500, 1_000, 5_000, - 10_000, - 50_000, + 10_000, 50001, 100_000, 500_000, 1_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_554"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_554_1" aria-expanded="false" aria-controls="job_list___sub_collapse_554_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_554_1"><button class="btn btn-outline-danger"><span class="job_id">554 : Job ID ce0eebe174434729bb260831b87044ab</span></button></div></a><div aria-labelledby="job_list___sub_heading_554_1" data-parent="#job_list___sub_accordion_554" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_554_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=216" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (216, 8), end pos: (216, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 93</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -212,8 +212,7 @@ 500, 1_000, 5_000, - 10_000, - 50_000, + 10_000, 49999, 100_000, 500_000, 1_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_555"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_555_1" aria-expanded="false" aria-controls="job_list___sub_collapse_555_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_555_1"><button class="btn btn-outline-danger"><span class="job_id">555 : Job ID a4f435b66c824f22804a8845bcf3a8e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_555_1" data-parent="#job_list___sub_accordion_555" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_555_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=217" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (217, 8), end pos: (217, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 94</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -213,8 +213,7 @@ 1_000, 5_000, 10_000, - 50_000, - 100_000, + 50_000, 100001, 500_000, 1_000_000, 5_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_556"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_556_1" aria-expanded="false" aria-controls="job_list___sub_collapse_556_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_556_1"><button class="btn btn-outline-danger"><span class="job_id">556 : Job ID f806f2da5a154f28a384bab287984906</span></button></div></a><div aria-labelledby="job_list___sub_heading_556_1" data-parent="#job_list___sub_accordion_556" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_556_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=217" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (217, 8), end pos: (217, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 95</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -213,8 +213,7 @@ 1_000, 5_000, 10_000, - 50_000, - 100_000, + 50_000, 99999, 500_000, 1_000_000, 5_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_557"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_557_1" aria-expanded="false" aria-controls="job_list___sub_collapse_557_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_557_1"><button class="btn btn-outline-success"><span class="job_id">557 : Job ID 7219ba38d1e147a6803262edf9ea2f28</span></button></div></a><div aria-labelledby="job_list___sub_heading_557_1" data-parent="#job_list___sub_accordion_557" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_557_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=218" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (218, 8), end pos: (218, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 96</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -214,8 +214,7 @@ 5_000, 10_000, 50_000, - 100_000, - 500_000, + 100_000, 500001, 1_000_000, 5_000_000, 25_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095426026772Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T095426866556Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_558"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_558_1" aria-expanded="false" aria-controls="job_list___sub_collapse_558_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_558_1"><button class="btn btn-outline-danger"><span class="job_id">558 : Job ID 44af87fc6a164270a2304753b79204ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_558_1" data-parent="#job_list___sub_accordion_558" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_558_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=218" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (218, 8), end pos: (218, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 97</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -214,8 +214,7 @@ 5_000, 10_000, 50_000, - 100_000, - 500_000, + 100_000, 499999, 1_000_000, 5_000_000, 25_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_559"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_559_1" aria-expanded="false" aria-controls="job_list___sub_collapse_559_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_559_1"><button class="btn btn-outline-success"><span class="job_id">559 : Job ID ebd295829ed8403191f6fe96e38f2487</span></button></div></a><div aria-labelledby="job_list___sub_heading_559_1" data-parent="#job_list___sub_accordion_559" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_559_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=219" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (219, 8), end pos: (219, 17)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 98</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -215,8 +215,7 @@ 10_000, 50_000, 100_000, - 500_000, - 1_000_000, + 500_000, 1000001, 5_000_000, 25_000_000, 50_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215343745605Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215344581812Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_560"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_560_1" aria-expanded="false" aria-controls="job_list___sub_collapse_560_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_560_1"><button class="btn btn-outline-danger"><span class="job_id">560 : Job ID add8d09a083f4e90b847dc37b2391596</span></button></div></a><div aria-labelledby="job_list___sub_heading_560_1" data-parent="#job_list___sub_accordion_560" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_560_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=219" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (219, 8), end pos: (219, 17)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 99</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -215,8 +215,7 @@ 10_000, 50_000, 100_000, - 500_000, - 1_000_000, + 500_000, 999999, 5_000_000, 25_000_000, 50_000_000,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_561"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_561_1" aria-expanded="false" aria-controls="job_list___sub_collapse_561_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_561_1"><button class="btn btn-outline-danger"><span class="job_id">561 : Job ID 42c2b0b8bd0241889484ca63bd14201c</span></button></div></a><div aria-labelledby="job_list___sub_heading_561_1" data-parent="#job_list___sub_accordion_561" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_561_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=220" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (220, 8), end pos: (220, 17)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 100</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -216,8 +216,7 @@ 50_000, 100_000, 500_000, - 1_000_000, - 5_000_000, + 1_000_000, 5000001, 25_000_000, 50_000_000, ),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_562"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_562_1" aria-expanded="false" aria-controls="job_list___sub_collapse_562_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_562_1"><button class="btn btn-outline-danger"><span class="job_id">562 : Job ID 39515f761d9c4bff9db927f3dd1b48a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_562_1" data-parent="#job_list___sub_accordion_562" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_562_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=220" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (220, 8), end pos: (220, 17)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 101</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -216,8 +216,7 @@ 50_000, 100_000, 500_000, - 1_000_000, - 5_000_000, + 1_000_000, 4999999, 25_000_000, 50_000_000, ),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_563"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_563_1" aria-expanded="false" aria-controls="job_list___sub_collapse_563_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_563_1"><button class="btn btn-outline-danger"><span class="job_id">563 : Job ID 70986574a2f248b4bcc4a1a9f6557918</span></button></div></a><div aria-labelledby="job_list___sub_heading_563_1" data-parent="#job_list___sub_accordion_563" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_563_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=221" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (221, 8), end pos: (221, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 102</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -217,8 +217,7 @@ 100_000, 500_000, 1_000_000, - 5_000_000, - 25_000_000, + 5_000_000, 25000001, 50_000_000, ), counts={},</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_564"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_564_1" aria-expanded="false" aria-controls="job_list___sub_collapse_564_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_564_1"><button class="btn btn-outline-danger"><span class="job_id">564 : Job ID ceec97cb4e334e588c2db5dea3f64473</span></button></div></a><div aria-labelledby="job_list___sub_heading_564_1" data-parent="#job_list___sub_accordion_564" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_564_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=221" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (221, 8), end pos: (221, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 103</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -217,8 +217,7 @@ 100_000, 500_000, 1_000_000, - 5_000_000, - 25_000_000, + 5_000_000, 24999999, 50_000_000, ), counts={},</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_565"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_565_1" aria-expanded="false" aria-controls="job_list___sub_collapse_565_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_565_1"><button class="btn btn-outline-danger"><span class="job_id">565 : Job ID 6b87265d362741fbbd608912ceabadf8</span></button></div></a><div aria-labelledby="job_list___sub_heading_565_1" data-parent="#job_list___sub_accordion_565" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_565_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=222" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (222, 8), end pos: (222, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 104</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -218,8 +218,7 @@ 500_000, 1_000_000, 5_000_000, - 25_000_000, - 50_000_000, + 25_000_000, 50000001, ), counts={}, sums={},</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_566"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_566_1" aria-expanded="false" aria-controls="job_list___sub_collapse_566_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_566_1"><button class="btn btn-outline-danger"><span class="job_id">566 : Job ID fa7153d770c94958b2bbe5b39a85da59</span></button></div></a><div aria-labelledby="job_list___sub_heading_566_1" data-parent="#job_list___sub_accordion_566" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_566_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=222" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (222, 8), end pos: (222, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 105</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -218,8 +218,7 @@ 500_000, 1_000_000, 5_000_000, - 25_000_000, - 50_000_000, + 25_000_000, 49999999, ), counts={}, sums={},</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_567"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_567_1" aria-expanded="false" aria-controls="job_list___sub_collapse_567_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_567_1"><button class="btn btn-outline-danger"><span class="job_id">567 : Job ID 5b5730c8cfbe420ea7aaf1e51db7d5fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_567_1" data-parent="#job_list___sub_accordion_567" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_567_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=254" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (254, 36), end pos: (254, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 106</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -251,7 +251,7 @@ # decrement in-flight if previously incremented key = (route,) if INFLIGHT.values.get(key): - INFLIGHT.values[key] -= 1 + INFLIGHT.values[key] -= 2 def inc_inflight(route: str) -&gt; None:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_568"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_568_1" aria-expanded="false" aria-controls="job_list___sub_collapse_568_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_568_1"><button class="btn btn-outline-success"><span class="job_id">568 : Job ID 6eeb153404e441c88bcbd7568bc5d4e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_568_1" data-parent="#job_list___sub_accordion_568" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_568_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=254" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (254, 36), end pos: (254, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 107</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -251,7 +251,7 @@ # decrement in-flight if previously incremented key = (route,) if INFLIGHT.values.get(key): - INFLIGHT.values[key] -= 1 + INFLIGHT.values[key] -= 0 def inc_inflight(route: str) -&gt; None:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204624865337Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204625733756Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_569"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_569_1" aria-expanded="false" aria-controls="job_list___sub_collapse_569_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_569_1"><button class="btn btn-outline-success"><span class="job_id">569 : Job ID aef71f8f635441b187ab549b2f74a89f</span></button></div></a><div aria-labelledby="job_list___sub_heading_569_1" data-parent="#job_list___sub_accordion_569" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_569_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 30), end pos: (263, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 108</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size &lt; 1: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T183612758268Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T183613669658Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_570"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_570_1" aria-expanded="false" aria-controls="job_list___sub_collapse_570_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_570_1"><button class="btn btn-outline-danger"><span class="job_id">570 : Job ID da9baef95c4e4a91ad6ee43bd79ecf4e</span></button></div></a><div aria-labelledby="job_list___sub_heading_570_1" data-parent="#job_list___sub_accordion_570" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_570_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=263" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (263, 30), end pos: (263, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 109</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -260,7 +260,7 @@ def observe_request_size(method: str, route: str, size: int | None) -&gt; None: - if size is None or size &lt; 0: + if size is None or size &lt; -1: return with _lock: REQUEST_BODY_SIZE.observe(float(size), method, route)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_571"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_571_1" aria-expanded="false" aria-controls="job_list___sub_collapse_571_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_571_1"><button class="btn btn-outline-success"><span class="job_id">571 : Job ID 2d9bdc6203e748529b3b6413b9368ca8</span></button></div></a><div aria-labelledby="job_list___sub_heading_571_1" data-parent="#job_list___sub_accordion_571" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_571_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=28" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (28, 0), end pos: (29, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -23,9 +23,6 @@ from dataclasses import dataclass from threading import Lock from time import time - - -@dataclass(slots=True) class CounterMetric: name: str help: str</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:17: in &lt;module&gt; from observability import ( observability.py:113: in &lt;module&gt; REQUESTS = CounterMetric( E TypeError: CounterMetric() takes no arguments ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:41:05+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:41:05+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:41:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:41:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: CounterMetric() takes no arguments !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 7 warnings, 1 error in 13.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_572"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_572_1" aria-expanded="false" aria-controls="job_list___sub_collapse_572_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_572_1"><button class="btn btn-outline-success"><span class="job_id">572 : Job ID 2e34388c302f4b8e8d116d157ba0c1ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_572_1" data-parent="#job_list___sub_accordion_572" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_572_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=53" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (53, 0), end pos: (54, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -48,9 +48,6 @@ ) lines.append(f"{self.name}{{{label_frag}}} {value}") return "\n".join(lines) - - -@dataclass(slots=True) class HistogramMetric: name: str help: str</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:17: in &lt;module&gt; from observability import ( observability.py:119: in &lt;module&gt; REQUEST_LATENCY = HistogramMetric( E TypeError: HistogramMetric() takes no arguments ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T02:21:59+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:21:59+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T02:22:00+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:22:00+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: HistogramMetric() takes no arguments !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 7 warnings, 1 error in 13.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_573"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_573_1" aria-expanded="false" aria-controls="job_list___sub_collapse_573_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_573_1"><button class="btn btn-outline-danger"><span class="job_id">573 : Job ID 410f2bcb85c9485695b3719260f5e35e</span></button></div></a><div aria-labelledby="job_list___sub_heading_573_1" data-parent="#job_list___sub_accordion_573" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_573_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=44" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (44, 29), end pos: (44, 56)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -41,7 +41,7 @@ def render(self) -&gt; str: lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} counter"] - for labels, value in sorted(self.values.items()): + for labels, value in []: label_frag = ",".join( f"{k}={_quote(v)}" for k, v in zip(self.label_names, labels, strict=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_574"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_574_1" aria-expanded="false" aria-controls="job_list___sub_collapse_574_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_574_1"><button class="btn btn-outline-success"><span class="job_id">574 : Job ID 02a6c2e63cea409da586e67e9cee31b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_574_1" data-parent="#job_list___sub_accordion_574" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_574_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=70" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (70, 17), end pos: (70, 29)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -67,7 +67,7 @@ labels = tuple(label_values) # Increment every bucket whose upper bound is &gt;= value so that # stored counts are already cumulative (Prometheus expectation). - for b in self.buckets: + for b in []: if value &lt;= b: self.counts[(labels, b)] = self.counts.get((labels, b), 0) + 1 # Always increment +Inf bucket count</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190032307055Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190033191259Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_575"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_575_1" aria-expanded="false" aria-controls="job_list___sub_collapse_575_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_575_1"><button class="btn btn-outline-success"><span class="job_id">575 : Job ID fc82230f1c444c559516f65484ab9bb1</span></button></div></a><div aria-labelledby="job_list___sub_heading_575_1" data-parent="#job_list___sub_accordion_575" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_575_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=86" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (86, 22), end pos: (86, 32)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -83,7 +83,7 @@ # &lt;name&gt;_count{...} &lt;total&gt; lines = [f"# HELP {self.name} {self.help}", f"# TYPE {self.name} histogram"] label_sets = sorted({lbl for (lbl, _le) in self.counts.keys()}) - for labels in label_sets: + for labels in []: label_frag = ",".join( f"{k}={_quote(v)}" for k, v in zip(self.label_names, labels, strict=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190358466367Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190359371807Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_576"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_576_1" aria-expanded="false" aria-controls="job_list___sub_collapse_576_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_576_1"><button class="btn btn-outline-danger"><span class="job_id">576 : Job ID 1f74c7ef48f94a7d947a6d6933528643</span></button></div></a><div aria-labelledby="job_list___sub_heading_576_1" data-parent="#job_list___sub_accordion_576" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_576_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=observability.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">observability.py, start pos: (92, 21), end pos: (92, 33)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aobservability.py +++ bobservability.py @@ -89,7 +89,7 @@ for k, v in zip(self.label_names, labels, strict=True) ) # Emit stored cumulative counts for each finite bucket - for b in self.buckets: + for b in []: c = self.counts.get((labels, b), 0) lines.append( f"{self.name}_bucket{{{label_frag},le={_quote(repr(b))}}} {c}"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_577"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_577_1" aria-expanded="false" aria-controls="job_list___sub_collapse_577_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_577_1"><button class="btn btn-outline-success"><span class="job_id">577 : Job ID 177c79b46bcb48b7962f30e82d3e1758</span></button></div></a><div aria-labelledby="job_list___sub_heading_577_1" data-parent="#job_list___sub_accordion_577" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_577_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt - nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for -: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb57e7508abf19a4d: unsupported operand type(s) for -: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026409EF5850&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; payload = {'id': 'fd5187ba-a971-44e6-9604-3b3cb72a8c2c', 'salt': 'dVQV1Gj3u1gXzx9PAWrNrA==', 'secret': 'unit-test-secret', 'timestamp': 1760729745, ...} key = b'b}K\xdbN,$\xd7\x05\xa5\xf6w2b\xae\x86\x7f\xb7\xf5\x06\xad\xf0\xde\x0e@\xd1\xa8\xb0u \xf0\x94' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt - nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026409EF7B00&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1640/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; payload = {'id': '8cb4e156-5ff8-4de0-b7d1-5e6e39e7f888', 'salt': 'f602YZBId1o4jGe/2JooiA==', 'secret': 'unit-test-secret', 'timestamp': 1760729745, ...} key = b'\xe9\x97+\xa9\xf5\x0c\xbaT\xaa\xf8\xf8E\x8b\xaf\x1bB\x94P\xb9`\xed_%\x14\xcf\x91\x9c\xe4\x91j\xd5\x07' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt - nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026409F19910&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp930ceftq.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; payload = {'id': '85708f3e-4430-4ac1-8583-51116eef4106', 'salt': 'NdBRAMpl73sdfoL1QQju9Q==', 'secret': 'test-secret', 'timestamp': 1760729746, ...} key = b'\xce\xe2bB\xcdt\xfeq&lt;\xa5h\xa0\x1d\xd7\xe4\x93\x1d\x14W\xc4\xf7\xb0\xceE\xfb\x93\x0c\xa3\x8ew\xf6\x9e' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt - nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026409F19AF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpidosomob.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002640721F650&gt; payload = {'id': '4c71ec69-dab2-4907-b094-a8c279db5a0d', 'salt': 'fgwYkGd4A+lj7yj9tSoF4A==', 'secret': 'test-secret', 'timestamp': 1760729746, ...} key = b'\x93\xd8\x17i\xed\xfa\xf8&gt;\x98\xd6\xb5\x14\xb7\xbd\xe1\xa8\x894\xa6b\x8f\x18\xfbS\x0c\nf?&gt;j\xaf\x97' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt - nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_578"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_578_1" aria-expanded="false" aria-controls="job_list___sub_collapse_578_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_578_1"><button class="btn btn-outline-success"><span class="job_id">578 : Job ID 748720732bfd43cda9a355effd1cad82</span></button></div></a><div aria-labelledby="job_list___sub_heading_578_1" data-parent="#job_list___sub_accordion_578" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_578_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce - ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF...F..F.........FF......... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150108747009Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150109572645Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e69b7149109865d80: unsupported operand type(s) for -: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000286BCBC9610&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; payload = {'id': '6916f0a6-53b0-45e0-a691-e42da21f50c9', 'salt': 'BYgHEM+5WAkd9BbJb1V6HQ==', 'secret': 'unit-test-secret', 'timestamp': 1760713274, ...} key = b'\x1af\xb6t\x1a\xb1\xc8X\xe8uA\xab\x85\xc1\x8c?\x8b\xca\xb1j\x96\x8a\xf4\xd5I9-Z\xdf\xb9\xcf\xcb' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce - ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000286BCBCB890&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-894/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; payload = {'id': 'f7812edc-0b1c-4b34-ab81-84d076ef4e5a', 'salt': 'TMz19xVTNlfYN5xI4dwXnA==', 'secret': 'unit-test-secret', 'timestamp': 1760713274, ...} key = b'+u\xc5\xfc3\xcdf\xbah\xb99\xe2\x1erR\xedv\xe1\x98R&lt;\xa1\x90A\xe1AC\x17H\x01\x92:' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce - ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000286BCBF16D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpe3hvjpqc.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; payload = {'id': '64cacb21-7ddd-4ac5-9128-f0b61935cd99', 'salt': 'DU9xVV6qvDrAxrcu2RdT/A==', 'secret': 'test-secret', 'timestamp': 1760713275, ...} key = b'J\x8c\xb8\xd7\x94\xfe\x04%\x05\xbd\x07h\xf6\xfb:J\x7f\xa3\xed\x9c\xaf\xc5q\xcd^\xb8\xa4\xd3~\x11T~' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce - ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000286BCBF18B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpk700_30r.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000286B9E9F380&gt; payload = {'id': 'f2bf4692-7919-43c9-9ab1-6179d985b8dc', 'salt': 'BFgIubD/6lHT4Ost9o4Edw==', 'secret': 'test-secret', 'timestamp': 1760713275, ...} key = b'u\xef\xfe\xbfA\x1b\x11\x8a\x14\x89\xf4;\x85\xb8t\xaa\xc3\x8c\xde@\xd0bn\xaef\xb6\xc5v\x8dY\xa8D' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce - ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 14 failed, 28 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_579"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_579_1" aria-expanded="false" aria-controls="job_list___sub_collapse_579_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_579_1"><button class="btn btn-outline-danger"><span class="job_id">579 : Job ID 2008e24bf32d40f59d19c59905f984c7</span></button></div></a><div aria-labelledby="job_list___sub_heading_579_1" data-parent="#job_list___sub_accordion_579" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_579_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT - 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_580"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_580_1" aria-expanded="false" aria-controls="job_list___sub_collapse_580_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_580_1"><button class="btn btn-outline-danger"><span class="job_id">580 : Job ID f0c2002596de445e864b48e2263213a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_580_1" data-parent="#job_list___sub_accordion_580" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_580_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start - fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_581"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_581_1" aria-expanded="false" aria-controls="job_list___sub_collapse_581_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_581_1"><button class="btn btn-outline-danger"><span class="job_id">581 : Job ID 99b12eba609047f7a645a0fd4c541100</span></button></div></a><div aria-labelledby="job_list___sub_heading_581_1" data-parent="#job_list___sub_accordion_581" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_581_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE - 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_582"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_582_1" aria-expanded="false" aria-controls="job_list___sub_collapse_582_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_582_1"><button class="btn btn-outline-success"><span class="job_id">582 : Job ID a3faae2f1eec401e932a1b672fe6ed0d</span></button></div></a><div aria-labelledby="job_list___sub_heading_582_1" data-parent="#job_list___sub_accordion_582" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_582_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE - 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022A5A49E450&gt; encrypted_payload = 'KYpfPlKjDhLOf+AHLsDMbqsJCeI97PqI0mnNASBpLllJYun3nQN2DXPNeRs5v9wBEdDo7sWGwZtMzlBKvpottCxkKtVCtFUHcV7wcALfOOK7sZ8HpVPna...RG/B3XtRg0yxBuInD+HQurWbY0o73UkAMcfiq9gnBx9PdMix0MNfY9QPLsH2pqzwwtTSBjb7c5QDEDqTkAgIHYFlZfBrl7X4cvRy2dGAhSzFjFpYmLTPXR' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE - 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022A5B61B6E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022A5A49E450&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-898/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022A5A49E450&gt; encrypted_payload = 'KYpfPlKjDhLOf+AHLsDMbqsJCeI97PqI0mnNASBpLllJYun3nQN2DXPNeRs5v9wBEdDo7sWGwZtMzlBKvpottCxkKtVCtFUHcV7wcALfOOK7sZ8HpVPna...RG/B3XtRg0yxBuInD+HQurWbY0o73UkAMcfiq9gnBx9PdMix0MNfY9QPLsH2pqzwwtTSBjb7c5QDEDqTkAgIHYFlZfBrl7X4cvRy2dGAhSzFjFpYmLTPXR' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE - 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_583"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_583_1" aria-expanded="false" aria-controls="job_list___sub_collapse_583_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_583_1"><button class="btn btn-outline-success"><span class="job_id">583 : Job ID c9984517318d4ba78f8274e6948d3c8a</span></button></div></a><div aria-labelledby="job_list___sub_heading_583_1" data-parent="#job_list___sub_accordion_583" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_583_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE - 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022562471C40&gt; encrypted_payload = '50gKJtfanLLotZ9pqZx0XjZ4joSAkGpe8trp1klJbhfbD5C07dnUu246kwSOIjM1WyXKscoVEsonHV054wxY4neucSxagl4c9T4ouR7MYsPtmXPHtj0iO...GfvKKEMftKpF253rYYo0HBjFN3qP2qOe1OOSBE8val6RdICi+gVhWmPI+3lUbDMeIoaE1ueJqbMtitra5EE6ldOgLegzxfZVNik9JKB+YDEqdM2fIlCLEx' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE - 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022564F8B980&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022562471C40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-346/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022562471C40&gt; encrypted_payload = '50gKJtfanLLotZ9pqZx0XjZ4joSAkGpe8trp1klJbhfbD5C07dnUu246kwSOIjM1WyXKscoVEsonHV054wxY4neucSxagl4c9T4ouR7MYsPtmXPHtj0iO...GfvKKEMftKpF253rYYo0HBjFN3qP2qOe1OOSBE8val6RdICi+gVhWmPI+3lUbDMeIoaE1ueJqbMtitra5EE6ldOgLegzxfZVNik9JKB+YDEqdM2fIlCLEx' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE - 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_584"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_584_1" aria-expanded="false" aria-controls="job_list___sub_collapse_584_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_584_1"><button class="btn btn-outline-success"><span class="job_id">584 : Job ID aa50813fc525464d8d43555efceedb07</span></button></div></a><div aria-labelledby="job_list___sub_heading_584_1" data-parent="#job_list___sub_accordion_584" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_584_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt * nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF...F..F.........FF......... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114345222545Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114346118066Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e497257a6a5b08aa1: can't multiply sequence by non-int of type 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FC08AE9640&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; payload = {'id': 'a7da5d0e-43c6-42f2-a671-85baad119922', 'salt': 'tGeFsNHJZ5/ZC6RW9rjo6w==', 'secret': 'unit-test-secret', 'timestamp': 1760701431, ...} key = b'\xa9U\x8c\xc7O/\xa8\xa5\xf4\xd2nt\xf5\xe7~\xaa&gt;\xba\x15\x0e\xa3hH\xf7\xc5\xb9\xf8st\xaata' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt * nonce + ciphertext ^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FC08AEB890&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-360/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; payload = {'id': 'b90c9585-8c52-47dd-a87e-6d1225b18626', 'salt': 'QCxJ6KW61g5/otrPz0PrBg==', 'secret': 'unit-test-secret', 'timestamp': 1760701431, ...} key = b'\x81Lj\x97\xd1_\x899\xe1\xae\x17A\xa35\xb3\xb1 \xe0y"\x0eE\x17l\xb8]\xd9\xd0\xc4f\x9ay' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt * nonce + ciphertext ^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001FC08B116D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpgmbur1ow.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; payload = {'id': '74cbed01-a691-4440-bb3b-6437b3032d0a', 'salt': '/o0ap/umONaHoW2PvXD5tQ==', 'secret': 'test-secret', 'timestamp': 1760701431, ...} key = b'`\r\xd1=\xaa\x17\x8f\x9d\xf7\xf8\xb6\xe5\t:Z\xb6r\t\xef\xe2\x96\xa0k?\xdd\xff\xb1\xe7\x04\x15\xc4\xf4' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt * nonce + ciphertext ^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001FC08B118B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp7qwlec9l.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FC05DC0FE0&gt; payload = {'id': 'bb81abb9-fa30-4147-9949-da3b20211ace', 'salt': '2KB+iVWCyQX4koFpT+4Qyw==', 'secret': 'test-secret', 'timestamp': 1760701431, ...} key = b')\xb2dx\x9ae#\xf1,\x86f\xe9L\x1c\x1c\x8d5\xeb&gt;\xa4\x0f\x89\x01\x86\xdd\xb3(\xc6\xc9\xe3g*' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt * nonce + ciphertext ^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 16 failed, 26 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_585"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_585_1" aria-expanded="false" aria-controls="job_list___sub_collapse_585_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_585_1"><button class="btn btn-outline-success"><span class="job_id">585 : Job ID 2a2c62175fdf406387645ec519852a3c</span></button></div></a><div aria-labelledby="job_list___sub_heading_585_1" data-parent="#job_list___sub_accordion_585" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_585_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce * ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: can't multiply sequence by non-int of type 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eac4ac5fb05bbe358: can't multiply sequence by non-int of type 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000017D12105760&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; payload = {'id': '45739c65-089c-4231-9d2d-98e4ae2821b7', 'salt': 'zad6OQMd3M2QhQcEv/9lZg==', 'secret': 'unit-test-secret', 'timestamp': 1760710901, ...} key = b'\xbdhWO\xbb\xc7\x1a\xdbE\xba\xd1"Y\xdf\xc5\x98\x89\x92\xf0\xb6\xa8\x7f\xf5B+\xd52\xf9T4\xf2\xd9' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce * ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000017D12107AA0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-788/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; payload = {'id': '6224e8e0-7061-4e66-aa2a-1f6dd9dfddfa', 'salt': 'J9sNvNCz8TRYls1kfUkAvw==', 'secret': 'unit-test-secret', 'timestamp': 1760710901, ...} key = b'VqgJ\xde\xf8\xee\xb6\xf6\x99\xf0\xe15;\x9d\x9d4\x04\x11\xd2\x0b\xe3\x9c\x1e\x93\xd8K\xf0\x16\xd5\x19\xab' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce * ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000017D1212D910&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpvk2zg46g.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; payload = {'id': '7a240c42-8aed-464c-8eb8-f9381d9d3edf', 'salt': 'LBUWORvs24L52MJPSVY5BQ==', 'secret': 'test-secret', 'timestamp': 1760710901, ...} key = b'j\xe3\xda\xc5\x89\xae\xf9\xbe\xa7\x9a\xdb\xd3\xd3-w\xa7\x9eh\xa1\xdf+\xa2\xb2\xa5\xcc\x99\xd0r\x1d\xc3\x9cE' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce * ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000017D1212DAF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp71vr6ufw.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017D0F5D1F40&gt; payload = {'id': '05fc1d7b-0828-44c7-a580-6f81ca7bf751', 'salt': 'o7CWgpVaA2dYBsNd3bdi8A==', 'secret': 'test-secret', 'timestamp': 1760710902, ...} key = b"\xb4\x04\xff\x15\xcc\x94'p\x82Z\x95$\xe1E\xfb\x9cz\xb4\xbdI\xe7o\x16E\xdc\x86w\xb5\xc1h~\xaf" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce * ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_586"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_586_1" aria-expanded="false" aria-controls="job_list___sub_collapse_586_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_586_1"><button class="btn btn-outline-danger"><span class="job_id">586 : Job ID 2834f0c4286741428940c61f72ac6ad2</span></button></div></a><div aria-labelledby="job_list___sub_heading_586_1" data-parent="#job_list___sub_accordion_586" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_586_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT * 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_587"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_587_1" aria-expanded="false" aria-controls="job_list___sub_collapse_587_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_587_1"><button class="btn btn-outline-danger"><span class="job_id">587 : Job ID ce7a781e105a4defa82d6ce5f367ecb2</span></button></div></a><div aria-labelledby="job_list___sub_heading_587_1" data-parent="#job_list___sub_accordion_587" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_587_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start * fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_588"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_588_1" aria-expanded="false" aria-controls="job_list___sub_collapse_588_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_588_1"><button class="btn btn-outline-success"><span class="job_id">588 : Job ID ad23a9ce0c1b457d93c5fd8eaa9807da</span></button></div></a><div aria-labelledby="job_list___sub_heading_588_1" data-parent="#job_list___sub_accordion_588" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_588_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE * 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000151D01B79B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000151CD645040&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2101/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000151CD645040&gt; encrypted_payload = 'KzyQLx1G7+Xvcwr+TgaE3OkFSOtD64Pgcntp4QhlLFPJeMyxGkYmkqHUXtg+Ea6+THdvHn4HWjE6T3Tl8t/FlvOKYselwLNDECKb+3rwSYetIoSgvltV0...PqownVRHy6OFSw+KDrQc+/HJnKa10vlwskF81AIer5UbRTPj0guB0N+K4AghEmHE91vxvohufzudEzLEYzwUql+ZmYEeeDC2CuOxpkrfoL1lbewrHLRFqq' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE * 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_589"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_589_1" aria-expanded="false" aria-controls="job_list___sub_collapse_589_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_589_1"><button class="btn btn-outline-success"><span class="job_id">589 : Job ID b885c4991746402da35853610a4c11ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_589_1" data-parent="#job_list___sub_accordion_589" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_589_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE * 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E46BACBB30&gt; encrypted_payload = '1FX59pIwwtr4wVNYw/l/VnwCJnbxBst4Gp4Q7o/tnEZvUtX7vy28UcMgjMw01GqTsyfHsjLBRWdO7G3mp/D5dCKS7LlPGcgTR/Lm8ULG7LuyZ8RS4UT8R...v6JzfNiBYmd9BEPJQi1msZ7YDZTAq7ilwk4dPCQ8UOtwspMmA58kiVMxmKQqGvspXppf4yNz0RRCgsnYSZKscS4f+9LkSwZG/7VzUgTTgm/3Sr0lglgraM' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE * 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E46CC2B4D0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E46BACBB30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1617/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E46BACBB30&gt; encrypted_payload = '1FX59pIwwtr4wVNYw/l/VnwCJnbxBst4Gp4Q7o/tnEZvUtX7vy28UcMgjMw01GqTsyfHsjLBRWdO7G3mp/D5dCKS7LlPGcgTR/Lm8ULG7LuyZ8RS4UT8R...v6JzfNiBYmd9BEPJQi1msZ7YDZTAq7ilwk4dPCQ8UOtwspMmA58kiVMxmKQqGvspXppf4yNz0RRCgsnYSZKscS4f+9LkSwZG/7VzUgTTgm/3Sr0lglgraM' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE * 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_590"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_590_1" aria-expanded="false" aria-controls="job_list___sub_collapse_590_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_590_1"><button class="btn btn-outline-success"><span class="job_id">590 : Job ID 163c8224b3e14106994761eaf8005d00</span></button></div></a><div aria-labelledby="job_list___sub_heading_590_1" data-parent="#job_list___sub_accordion_590" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_590_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE * 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000201C1392750&gt; encrypted_payload = 'FirErIivwj2uP2vgxnDibN2SqpmyLe6DuKuo2pqw2aOHFfdqy8RARTjOefKI1UmDHB+GvJYXy2rY9ETRILw6xJ05Q6zhJtM2LCul2SnNgFdz57fcWfe1u...E4cHz4zn9gZrH+9MkCQfDnVRWg4s3bo9+SZQ8FaQoBSA3hwtao2mFR6NglIVDwQBQacK7P9UQ0Yu8W3ylv91ZmxO5A4uFihVPxrNJWf22BO9KeroZtNZPp' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE * 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000201C37EB5F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000201C1392750&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1242/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000201C1392750&gt; encrypted_payload = 'FirErIivwj2uP2vgxnDibN2SqpmyLe6DuKuo2pqw2aOHFfdqy8RARTjOefKI1UmDHB+GvJYXy2rY9ETRILw6xJ05Q6zhJtM2LCul2SnNgFdz57fcWfe1u...E4cHz4zn9gZrH+9MkCQfDnVRWg4s3bo9+SZQ8FaQoBSA3hwtao2mFR6NglIVDwQBQacK7P9UQ0Yu8W3ylv91ZmxO5A4uFihVPxrNJWf22BO9KeroZtNZPp' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE * 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_591"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_591_1" aria-expanded="false" aria-controls="job_list___sub_collapse_591_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_591_1"><button class="btn btn-outline-success"><span class="job_id">591 : Job ID 5450333b338746508e6ce9af69964327</span></button></div></a><div aria-labelledby="job_list___sub_heading_591_1" data-parent="#job_list___sub_accordion_591" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_591_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt / nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for /: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6731dee6d435a8a9: unsupported operand type(s) for /: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021AB68B55E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; payload = {'id': '78c313a3-ba64-4e8a-a95d-04e127f49fc5', 'salt': 'NmRZA32TiNRFn85DHt8p5A==', 'secret': 'unit-test-secret', 'timestamp': 1760711489, ...} key = b'+\xf3\x1c\xea2\x87px\xc5Y3\x1d\r\xa4\x03\xa5\x9b{\x10{~$\xab\xfa\xc9\x1d\x9f|\xfb0\x95\xc2' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt / nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021AB68B7980&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-811/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; payload = {'id': 'bf33d204-a5e4-4639-9462-28708595e0c6', 'salt': '+hbbfWL9bJyVnn4vFisC7g==', 'secret': 'unit-test-secret', 'timestamp': 1760711490, ...} key = b'\xeb\x82\x19\x06\xb8\xc8\xa3&lt;\xa0\xe5\xaf\xca\x83\x06Q\xb1\xc5\xc6f\x7f!\xc4\xfa\xd6\xbb\xdfM\xb0n\r\xe3G' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt / nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000021AB68DD790&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpweu6e_ze.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; payload = {'id': 'b10d02aa-bea0-4f6a-8480-fa23f89fa722', 'salt': 'cnlW6ax91844TjOdeQlAYg==', 'secret': 'test-secret', 'timestamp': 1760711490, ...} key = b']\xd4V&amp;U-+\xbc\x9c\x12\xba\xe6\x83\x8b@\x9e\xfb&lt;\xec&amp;\x0bb\xefb$\xcbA\xad\xc3z"h' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt / nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000021AB68DD970&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_g4q2xlx.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021AB3CE1A30&gt; payload = {'id': '9ea606d8-7ce5-4e81-8fdb-eebb1378f30c', 'salt': 'g85/Tq2FLKXlF1i8JpJbYg==', 'secret': 'test-secret', 'timestamp': 1760711490, ...} key = b'{\x83\\\x83Av\\\x94\xb73\x00+E)\xef\xec\xcdl\x92\xd3\x0c\xfc]\xdb\x9d3U\xd8[ @V' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt / nonce + ciphertext ^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_592"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_592_1" aria-expanded="false" aria-controls="job_list___sub_collapse_592_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_592_1"><button class="btn btn-outline-success"><span class="job_id">592 : Job ID 089438f8945a4c1bb1cdb827cb0c613f</span></button></div></a><div aria-labelledby="job_list___sub_heading_592_1" data-parent="#job_list___sub_accordion_592" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_592_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce / ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for /: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef384515912261920: unsupported operand type(s) for /: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B8FBD35790&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; payload = {'id': '71b64d9b-fd26-4565-aa5c-e32514082fef', 'salt': 'GzFxyM7FGff9H9ZR8x4dJA==', 'secret': 'unit-test-secret', 'timestamp': 1760703742, ...} key = b'\xb4E\x84\x8c\x92\x12\xe1\x88\xc6\x0f\xc3\xb25J[\xad)kC\x10\x0fI\xf2\xeeJ\xca\x15\x01\xb3$\x94\x10' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce / ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B8FBD37AA0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-459/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; payload = {'id': 'dcbbcc1b-ca7d-4992-978a-83bb844893ac', 'salt': 'xza5W2zKti43VUpfdFwPyg==', 'secret': 'unit-test-secret', 'timestamp': 1760703742, ...} key = b'\xd4\x19^&amp;:-\xca\xd3\xbd03\x96\xe6\x82\x00\x837\xa8\x1e\xd2\xadN\xda\xe9\xa8\xb0Z\x06Y\xd9H\x0e' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce / ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B8FBD5D8E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpt5s88q7h.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; payload = {'id': '264c9a43-123f-40d1-8005-0394d9791d11', 'salt': 'VOrshYaZsoe1/zuOkdg2uQ==', 'secret': 'test-secret', 'timestamp': 1760703743, ...} key = b'aJ\xb1\xab\xfa+\xaf.2Z\xad(\xe2\xe4\xda\xa2GS\x11\x059j\x91\x18\xaf`\x14F\xfc.=\x08' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce / ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B8FBD5DAC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpdvkmvqn0.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B8FBBA21B0&gt; payload = {'id': 'bd136f6a-a3e6-4136-ba5b-d7f2e3b6f395', 'salt': 'YpETgMUTD+cqQr547l82tw==', 'secret': 'test-secret', 'timestamp': 1760703743, ...} key = b'?}\xc9\x8e\xd7"a\x9e\xfb{\x0f\xe9\xb1\xaa\xfd\xca\xa0\x17\xa87\x19\xc5\xae\xebMc\x04~=g\x88\x12' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce / ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_593"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_593_1" aria-expanded="false" aria-controls="job_list___sub_collapse_593_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_593_1"><button class="btn btn-outline-success"><span class="job_id">593 : Job ID f34acc4bcf854eea91d5a208f3b81475</span></button></div></a><div aria-labelledby="job_list___sub_heading_593_1" data-parent="#job_list___sub_accordion_593" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_593_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT / 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614edcb4708accee4750: slice indices must be integers or None or have an __index__ method ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019A098B9760&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; doc = Document('None', &lt;memory, doc# 11&gt;) encrypted_payload = 'KflTG0/yRhKf+MzYMYoVp84DX1aZRNEzuAPr09ODOUBkjUfIvQ7X7AxvGG0KstjqCM8zOSQb+9hD61NEotLMDPW6DUx4oMaz8zrCANnr8tetDBNmoCk5u...dJnDQpSndcpPT1kGaZS0yal55X6zhNLGoFhDavFyEMwbnGZ6f2Oj22Ceijm8fFF7FfhV259EOBm90zcwYWFVF0UZgx7RE3WnzDJ4S3wul6Eczd4PxtSaLm' watermark_id = '6bbd585a-0673-4a6d-acc3-cca610393810' key = b'mQYR\xe7 \xd9\x98\x16\x80s\xe8\x8e\xc7\xf2\xdb\xc9\xf1=\xd8#\xcc\\m\x8e\xff\xe4\x0f\x03\x1e\xdd:' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT / 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019A098BB7A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1295/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; doc = Document('None', &lt;memory, doc# 17&gt;) encrypted_payload = 'L254yaI4iPX7zuDElw/c/wMcAL1ccDJVt+lvPFQiFB7MKtTqydmiHeEe14MiStvzeMZ7NuE4ehe2stEc86wHpG/2k25RyTZCDQG1xatfhg92yT8mvbDZq...ydZzZDSXMtzEO4nAlU/m2NhnGVlur084GJbwejpJTF3AxGLI/SKuSCDIfqrERbLPM/m1RajFmrD6D8i2E7j7M7s9xAXxAHOyfrsBpo1jcy0Gy/Fq3FDShK' watermark_id = '2a3f6dab-ceda-4354-aea8-b5a073e5ec38' key = b')j\xb5\x9dTF\xf7\x9c\xd1\x01\xab\x12\xf1\xd1\xb9\x04;\x9f5&gt;\xc1\xf2^\xd7i\xf6\xf00k4_s' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT / 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000019A098E15B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpwtia_w08.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; doc = Document('None', &lt;memory, doc# 26&gt;) encrypted_payload = 'VURoM83juGyNKEzrHh02WdNC8/AFz6vuUG5OpYMLKQ0/vlIvrXhRUD2jyNelXyofp2QL3kHRCM4l9nR0EN/uZ5fVLNPX0gur5MZZY1dFlVSXJbN4pdKnm...sZ8cnfkY9u6L1992AIGbTysK9ZmeGsQIdpD+Kp8dK/oEvyW+JU1sY91JTdi7yAI6BAikioaPE0PAGdr2te1/BgDZFkKnwzX/3bkiuQQagX82Dk7zFYBA==' watermark_id = '2d48b5b8-5da7-4bdd-872e-d4307a725833' key = b"\xb9\x8e@U@b'v\xa0\xff)\xd6\xe0O\xf2+\xbc\xc54\x0c7\xa7\xd9\x80o\xc8iMq\xe27\xa5" def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT / 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000019A098E1790&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpettoxjbp.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019A05C5F380&gt; doc = Document('None', &lt;memory, doc# 28&gt;) encrypted_payload = 'sRbm1euP+r1GQmAuxyfQRZP1Zey/jQTe+DOTXzx9NR1hZPL9IJbMk12GBELXYefWC7sdDKs9Zi0rD+9E5T1vKdBin6BYC7klCTgn/qOJBCcte5CUeJy5n...dDYHhxSEkZb8OxPBaS6dxC5ocINLu5skg0mSwEKZUYZ7Fl2DCEp5IGx6UNwyYkToN0esbpE2Y2s7/A341anhcqTXmWKUs8uNSjU23PgCsvNRtGofXEWQ==' watermark_id = '6571d6a2-da4a-46f4-9c61-f161a5184142' key = b'5\xf5\x183\xb5\x1a#\xf7\xe3,\xf0\x00.\xc9\xea\x0cTu\xfe6\xdd\x98jz#\xabE\xa1\xfa\x88B\xa6' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT / 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_594"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_594_1" aria-expanded="false" aria-controls="job_list___sub_collapse_594_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_594_1"><button class="btn btn-outline-success"><span class="job_id">594 : Job ID fbdcfaa9b2d242e69180da78dced45c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_594_1" data-parent="#job_list___sub_accordion_594" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_594_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start / fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e44b9ef6bf157b504: slice indices must be integers or None or have an __index__ method ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F55C265640&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; doc = Document('None', &lt;memory, doc# 11&gt;) encrypted_payload = 'v7DVPKTLqDRYU3iy2802QsvAxOanTIJ5gWZFaL27bogQar3wV8pDgtbGTEyVEz/Kx8iQEo7V13+Utlz83kE7K2kJLFq0N2K7hADdYvoSvMlVv0A1/QN0l...CVL1YMQ3uQYU+x3mVFMSpF3QtMnOrV2TplXoXh9eG9+rPjfQXnrH2egglfp48XA3HWALPVqWTpAD0aHIwkvr1kPawKUNv42tC/WSZHCRkmBZixClfxRbiU' watermark_id = '592bc6f1-607a-4a0b-814f-1835d5dfcb9a' key = b'z2[\xf2}\x7f\x85j\xab\xef&amp;S0\xa9\xd9D2J\xa6\x08\xad\x8asIg\x86k\xfc&lt;n\x82\x1f' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start / fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F55C267AD0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1869/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; doc = Document('None', &lt;memory, doc# 17&gt;) encrypted_payload = 'Tf2UOy5thgTFUnkbAHI3dbb6jnbKsYtEuWMwDLG5La2aFqJbIc/fcdojDZylVsihMOVhpx0F2fRmofYx5YBlAS9dwZQwFgz+LHEEMQjCeqHVYBfjpcly7...ADkxIc/dTomA8lKabqFKfLhL09RMo3TBAKUp72Dyh/S4z4FgVp+1Ys31bFnpdkDBeQoXAL8576mmm7TOy7jN26zslwMxuzyut61MYpKkmKUva1DkJ6VKMF' watermark_id = '1dfe47bc-7c69-466f-a7b7-00e8dbd48115' key = b'\xd0R\xa5\xb7\xf1\xc2#\xce\xa2\x9b,I\xf5*\xcb\x92\xfeuUh|w:\x17\x07\xfa\x81\x86\xb3R\x0e\xa8' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start / fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F55C28D910&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpukugvojb.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; doc = Document('None', &lt;memory, doc# 26&gt;) encrypted_payload = 'KTFvxm5pfJ+BN95cm3LdEBqHcQLsr58iUM7DdNpI6rbhCpxlZaNyoZ4H2vKaINHa19Z53302zayZdvSUfyF4GCMeg1yJOt3H23Mm6WbvTEII1HI6SGlLe.../oAWPIgA77l3R43rV/9CZ9BBJvHfTGq4sMDxldyB7jTPRmnbCUpzeUxBtbAdyiCU1ZrHQAxioB1e2gE/kelAbknqdL1V1MrjyjF47SJMAzZZdKpJ2tDw==' watermark_id = 'ee08ee3c-488f-40a5-8150-7bdf7258172a' key = b'\x9c\x8cV\xee\xaa\x0f.\xfb\x9b\x17\x982\x04\xcb\x80%\xf5\xc7\x92\x10\x16\x98z\xae\x9a\xdb\x86)\xe1\xaap\xf6' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start / fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F55C28DAF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp34tvaem9.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F5592AC950&gt; doc = Document('None', &lt;memory, doc# 28&gt;) encrypted_payload = 'mHLM2jyYXHoDXvfVxr3mLlPqZb+r6IK7fdBb1XzerFmBcEN6VZJFoxxvWtFkqUUfskbIhRu4xro54h6P0iHLVBqbwtc2sNIlv+BmIlPFdofOsMKL6n2U0...CjABUEmWrO7NjTecOAxiT59dKyysAoST3Plzmy7o1O/pTKSDNST0m1+xyVqlCD2k0IVO65LJ2/kPNDPLVuCpfHDXtj7Sk7fVRLi+vrjeqioMXmjVgTWg==' watermark_id = '21b7d618-a1e3-4dad-87f9-331583f6481b' key = b'\xfa\x1c\xc5\x05\t[(\x8b.A\x15\x95\xee\xb8Su\x1e|\xa6B\x19\xc4\x7f\x87\xf6\x8cG\xdf\x95\x0c\xe2\x8e' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start / fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_595"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_595_1" aria-expanded="false" aria-controls="job_list___sub_collapse_595_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_595_1"><button class="btn btn-outline-danger"><span class="job_id">595 : Job ID 79f4140184cf4558876c29f56127c7f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_595_1" data-parent="#job_list___sub_accordion_595" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_595_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE / 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_596"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_596_1" aria-expanded="false" aria-controls="job_list___sub_collapse_596_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_596_1"><button class="btn btn-outline-success"><span class="job_id">596 : Job ID 510a38a73fec49f781b184b8a139e1dd</span></button></div></a><div aria-labelledby="job_list___sub_heading_596_1" data-parent="#job_list___sub_accordion_596" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_596_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE / 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.........F.................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T153222657942Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T153223569146Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF6381FF50&gt; encrypted_payload = 'jpLe3hddF2imeUnfU3exza/jzxKXSBaqXMzic5dwlQf1jbfcXtPW31lSLDkmOJeFWtAs33KkKwdNQb4zB8u1NwJAZ/Ufe3aXK2vITVSdSBqBz89b22Z38...1AGEqLjd8OSkiatY8nnSKhdO6IFXByrnLI75xmunrxZWF++rUt+1XDfRt9CGfySawHTRVUQws8WR/WWng7whUa/KV/Bc4L7z4xj2TaeFFwKijNvgqgS7uL' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] &gt; nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE / 12] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:437: TypeError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EF65957A10&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF6381FF50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-980/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF6381FF50&gt; encrypted_payload = 'jpLe3hddF2imeUnfU3exza/jzxKXSBaqXMzic5dwlQf1jbfcXtPW31lSLDkmOJeFWtAs33KkKwdNQb4zB8u1NwJAZ/Ufe3aXK2vITVSdSBqBz89b22Z38...1AGEqLjd8OSkiatY8nnSKhdO6IFXByrnLI75xmunrxZWF++rUt+1XDfRt9CGfySawHTRVUQws8WR/WWng7whUa/KV/Bc4L7z4xj2TaeFFwKijNvgqgS7uL' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE / 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 9 failed, 33 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_597"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_597_1" aria-expanded="false" aria-controls="job_list___sub_collapse_597_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_597_1"><button class="btn btn-outline-success"><span class="job_id">597 : Job ID 899b81bbfd2043f48cb50b439a81323b</span></button></div></a><div aria-labelledby="job_list___sub_heading_597_1" data-parent="#job_list___sub_accordion_597" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_597_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE / 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BB425CA1B0&gt; encrypted_payload = 'IzNgm/Sl2oyNS+UZKPhRCUpzziShqz7/lFn3cCDJpX1deHKoSggLEYLmyM1YOTa8SGt+dxPLZ4NX4pyMjiP0yrw1gcF+V856H+FuMCt7u/AE+cvwxefK+...iahvMiVS5BtErat5YKlNepN1hBEo+DClfPbQlq4BN1g/mkzQqGTH7WrvLYLSh8n0a9rf6RbNi2Dlp4YmzFYiDwRE/B2mb4ew1Z48FJ/XBW80HwQvxJgk9V' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] &gt; ciphertext = encrypted_data[self._SALT_SIZE / 12 :] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:438: TypeError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002BB4320B770&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BB425CA1B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-521/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BB425CA1B0&gt; encrypted_payload = 'IzNgm/Sl2oyNS+UZKPhRCUpzziShqz7/lFn3cCDJpX1deHKoSggLEYLmyM1YOTa8SGt+dxPLZ4NX4pyMjiP0yrw1gcF+V856H+FuMCt7u/AE+cvwxefK+...iahvMiVS5BtErat5YKlNepN1hBEo+DClfPbQlq4BN1g/mkzQqGTH7WrvLYLSh8n0a9rf6RbNi2Dlp4YmzFYiDwRE/B2mb4ew1Z48FJ/XBW80HwQvxJgk9V' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE / 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_598"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_598_1" aria-expanded="false" aria-controls="job_list___sub_collapse_598_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_598_1"><button class="btn btn-outline-success"><span class="job_id">598 : Job ID d55f4bbb9f4c4dda910abe56ac97d246</span></button></div></a><div aria-labelledby="job_list___sub_heading_598_1" data-parent="#job_list___sub_accordion_598" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_598_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt // nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for //: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e78ddca2bce196f33: unsupported operand type(s) for //: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E25DCE58B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; payload = {'id': 'acdf4152-5857-42e2-b5ac-df06c0a08159', 'salt': 'Ja+Fr2diYhvJ04PHsJXtIw==', 'secret': 'unit-test-secret', 'timestamp': 1760725694, ...} key = b'o\x97\xff\x94\x84\xb7\x8d\xfb\xa194\xf0`\xaf\xc3}x\xfb\xc0p.\xe7\xc0?B\xd6\xaeJ\xac\x80\t\x1f' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt // nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E25DCE7A70&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1454/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; payload = {'id': '90c7e254-6916-4b48-8aab-3fa158b3d03f', 'salt': 'TFRInxsfUvluL7zLncTASw==', 'secret': 'unit-test-secret', 'timestamp': 1760725694, ...} key = b'\xe8\x94\xb0\xe2\x06\x95\xdc\xcc\x1b\xc1brP\xc8P\xeed\x18\x0b\xb6A\x93\xb8\x8e\xc2t\xadC\xfd\x88\nb' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt // nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E25DD0D8B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpc_7izpt7.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; payload = {'id': '8ab10e7f-12ec-4239-b3af-3b5def85db07', 'salt': 'z+Ymky3HYbhu4pF/Pebe+g==', 'secret': 'test-secret', 'timestamp': 1760725695, ...} key = b'\xa5@\xacW\x8d#\xc7d\xe7\xde\xb7\xfc\xd5c?ji\xea\xf5\x9bL\x15\x9a\xfc^\xc0\xa0\x1d\xaa\x02\xd6e' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt // nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E25DD0DA90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_bj2h60r.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E25B183FB0&gt; payload = {'id': '5191ca48-3289-46ed-b199-2b494a5836dc', 'salt': 'l60USr20SVi7S/onbQDXTQ==', 'secret': 'test-secret', 'timestamp': 1760725695, ...} key = b'CS[\xb9\xdd\xb3\xba\x07C\xb2\xc0\xc7W\xba\xa4\x90\xd2\xa8!\rX\x15\x8b\x8b7\x8d\x9b`\xe1\xd9\x8d~' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt // nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_599"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_599_1" aria-expanded="false" aria-controls="job_list___sub_collapse_599_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_599_1"><button class="btn btn-outline-success"><span class="job_id">599 : Job ID 55b9fe9f115e4a65a9400f83c9170f5c</span></button></div></a><div aria-labelledby="job_list___sub_heading_599_1" data-parent="#job_list___sub_accordion_599" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_599_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce // ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for //: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6b0188d9d89cd13e: unsupported operand type(s) for //: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001A2F1EC9670&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; payload = {'id': 'ba5e0d89-e423-407d-992f-b26a08cf8425', 'salt': '4XbhOvHncI7fI6C+UKjV0g==', 'secret': 'unit-test-secret', 'timestamp': 1760733729, ...} key = b'\x12\xf0\xee\xf2\x8aq\xfbK\x11%\xf6\x9d\xa0\x9dP\xcb\xfc\x8f9\xc1\xb9_\x18\xdd\xa9\xe1\xca\xef\xaa0\x86`' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce // ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001A2F1ECB860&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1818/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; payload = {'id': 'abc234c3-e302-48f9-be33-1b9e598d4dc5', 'salt': 'QDhoSC3tTOFyrkAvaNDrzQ==', 'secret': 'unit-test-secret', 'timestamp': 1760733729, ...} key = b'\xc6\xbd&amp;\x07\x84\xea\x96\n\xd4\xfcll\xff\x0c\x13\x13\x0c\x02_\x97\x1bT\x121k%\x0f\x93\xe4 \xa8\x90' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce // ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001A2F1EF16A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp88t5xyfj.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; payload = {'id': '7dcb9b42-c78f-4c4b-bb64-53b2b10f36d5', 'salt': '6YE/C1Twvye15gCTT3PcnQ==', 'secret': 'test-secret', 'timestamp': 1760733730, ...} key = b'S\x18\x9b\xa0\x89\xad\x8d\x03\xc4\x0e\x18\xfb_\x8e)\xcbc\xaf\xba\xba\xd4&amp;\x0f_\xc9/$\xa1\x10\xf9\x8b\xfe' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce // ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001A2F1EF1880&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpc4xs6tac.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A2F0D53E90&gt; payload = {'id': 'ca837aae-230d-44bc-8c8d-f3fa868d00a1', 'salt': 'CLnERL+3eq9YCv0vSTnm4Q==', 'secret': 'test-secret', 'timestamp': 1760733730, ...} key = b"\x9a\x80\x95\x1ch\x90\xb4\x15lt&gt;\xd8\x89\x9a3k|\x01i\xa1\xefA\x04\xa9\xb3\xfd',\xec\xad\xd5\xed" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce // ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_600"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_600_1" aria-expanded="false" aria-controls="job_list___sub_collapse_600_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_600_1"><button class="btn btn-outline-danger"><span class="job_id">600 : Job ID 0bb31bca8f25487bb63a876259374c00</span></button></div></a><div aria-labelledby="job_list___sub_heading_600_1" data-parent="#job_list___sub_accordion_600" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_600_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT // 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_601"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_601_1" aria-expanded="false" aria-controls="job_list___sub_collapse_601_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_601_1"><button class="btn btn-outline-danger"><span class="job_id">601 : Job ID 608217c2c7d943ebb02d5bd2a52a11ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_601_1" data-parent="#job_list___sub_accordion_601" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_601_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start // fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_602"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_602_1" aria-expanded="false" aria-controls="job_list___sub_collapse_602_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_602_1"><button class="btn btn-outline-danger"><span class="job_id">602 : Job ID f7d9647af1074e5797d4da6d23c4a344</span></button></div></a><div aria-labelledby="job_list___sub_heading_602_1" data-parent="#job_list___sub_accordion_602" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_602_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE // 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_603"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_603_1" aria-expanded="false" aria-controls="job_list___sub_collapse_603_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_603_1"><button class="btn btn-outline-success"><span class="job_id">603 : Job ID ce7d8c4697824de58e55ce76d52be4b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_603_1" data-parent="#job_list___sub_accordion_603" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_603_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE // 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C782CE21B0&gt; encrypted_payload = '4PdjUm7nRmamnxd1yfcV6JyaxRjZULU0fL5fsA5mXXTk48fI8p5MWXeSsRvgd2gBdjYYeLwUmv+od3YXMYG+vKZXzItthB9CVj7JIx6Mv/7FOPCClnByn...gyR2gwri+8JDUQDdTGfliYxolFB1HbSODFzWrQ2m0ddAj3VoRAClj0t7Oas1AgvIVO9b27DbwZU+Jlhl5sK0Www1l1j5bfCtbzJv3k2VgPFHG+89IL6F6r' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE // 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C782E77AA0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C782CE21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-830/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C782CE21B0&gt; encrypted_payload = '4PdjUm7nRmamnxd1yfcV6JyaxRjZULU0fL5fsA5mXXTk48fI8p5MWXeSsRvgd2gBdjYYeLwUmv+od3YXMYG+vKZXzItthB9CVj7JIx6Mv/7FOPCClnByn...gyR2gwri+8JDUQDdTGfliYxolFB1HbSODFzWrQ2m0ddAj3VoRAClj0t7Oas1AgvIVO9b27DbwZU+Jlhl5sK0Www1l1j5bfCtbzJv3k2VgPFHG+89IL6F6r' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE // 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_604"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_604_1" aria-expanded="false" aria-controls="job_list___sub_collapse_604_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_604_1"><button class="btn btn-outline-success"><span class="job_id">604 : Job ID 7f4252ad63e945a586c53623f7228f9f</span></button></div></a><div aria-labelledby="job_list___sub_heading_604_1" data-parent="#job_list___sub_accordion_604" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_604_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE // 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C92E496E40&gt; encrypted_payload = 'TG5qqdS6gH9qE/i4BTLDc5RU72/fRI2uzjPN0l9suFNS3RaBlgdvuLCezSQPvr5SfIXquDPjSih0JfSqmyLAogPQs1qyGdLMYpprVhKbkFdiC8Ywe8Cuv...6nhhJcqFOJ50moZSMlLSxJr6OMlOmiEA8or0XVPifbYuxc2rvaLLBscrh8fS6f9EbN72KHDN7csql8e59WUzcWqmddfHr0owYX37A8mi6fNc9H3CmaIB46' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE // 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C930FF7950&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C92E496E40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-220/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C92E496E40&gt; encrypted_payload = 'TG5qqdS6gH9qE/i4BTLDc5RU72/fRI2uzjPN0l9suFNS3RaBlgdvuLCezSQPvr5SfIXquDPjSih0JfSqmyLAogPQs1qyGdLMYpprVhKbkFdiC8Ywe8Cuv...6nhhJcqFOJ50moZSMlLSxJr6OMlOmiEA8or0XVPifbYuxc2rvaLLBscrh8fS6f9EbN72KHDN7csql8e59WUzcWqmddfHr0owYX37A8mi6fNc9H3CmaIB46' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE // 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_605"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_605_1" aria-expanded="false" aria-controls="job_list___sub_collapse_605_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_605_1"><button class="btn btn-outline-success"><span class="job_id">605 : Job ID df3ffb6fb9384758a6c077d07bc93afc</span></button></div></a><div aria-labelledby="job_list___sub_heading_605_1" data-parent="#job_list___sub_accordion_605" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_605_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt % nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: not all arguments converted during bytes formatting _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e5b0ca4caa449527d: not all arguments converted during bytes formatting ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000110643F9460&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; payload = {'id': 'b386a247-f69a-453c-93ca-00822fa4fb22', 'salt': 'FsNohTP3drS0yNk40bPATQ==', 'secret': 'unit-test-secret', 'timestamp': 1760695823, ...} key = b'\x9d4\x9d}\x00/#^\xb6*r&lt;\x10H\x990\x9e3\xdf\xads=\xf8\x83\xe8\xa9O\xd9\x9ax^\xb1' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt % nonce + ciphertext ^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000110643FB8C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-107/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; payload = {'id': 'cfb1aabe-bfa7-486c-a320-f965cf10f750', 'salt': '+U2qn2ZOe9Jh9bT039eaJg==', 'secret': 'unit-test-secret', 'timestamp': 1760695823, ...} key = b'\x00P\xe6\x0f:\xbc,\xbf\x81x$xD\x94\xaeD\xdb&lt;\x19\x8f\x07\xdd\x8b\x95\x01\xfb\xebc$t\x8d\xcc' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt % nonce + ciphertext ^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000011064421700&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpn31l2nav.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; payload = {'id': '6d9b9866-1d23-4e06-8104-e2b990de3e32', 'salt': 'LDXwvewhLjePWj5sg+jmuQ==', 'secret': 'test-secret', 'timestamp': 1760695824, ...} key = b'+\x0f\xb9\xf1\xee\x8c\xc7\xc0\xb4&amp;\xe3\xe4\xea\xe0\x93\xa5\xa5\xb3\xc7\xe3\x84\xf4e\xf6\xc8\xb5A#L|\x9d\xb9' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt % nonce + ciphertext ^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000110644218E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp108cy8um.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000011061841640&gt; payload = {'id': '6dbd2ece-9eb0-4c2b-8d0f-34eca002e49c', 'salt': 'tszneZcSZEhY0ZHVMqplJw==', 'secret': 'test-secret', 'timestamp': 1760695824, ...} key = b"\xe3\xb0J\xa4\xbf\x15\xe2\xe5\xac\xce'U\xa2\xe7YF\xa9V\x90.&gt;p\xe58\xa7\xbc\x1f\xae\xe7\x93\xe7s" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt % nonce + ciphertext ^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_606"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_606_1" aria-expanded="false" aria-controls="job_list___sub_collapse_606_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_606_1"><button class="btn btn-outline-success"><span class="job_id">606 : Job ID 9e2c70d498db4a51963473edc07f0d16</span></button></div></a><div aria-labelledby="job_list___sub_heading_606_1" data-parent="#job_list___sub_accordion_606" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_606_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce % ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: not all arguments converted during bytes formatting _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef82999ab8b935de8: not all arguments converted during bytes formatting ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000183CF8C9610&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; payload = {'id': '4beb2b36-9885-4a40-a0ee-0006fb6f1ce5', 'salt': 'VGfEI0F6Saown0H2u/Oi2Q==', 'secret': 'unit-test-secret', 'timestamp': 1760724664, ...} key = b'\xa4\xf7\xd1\xb6\x91\xa4(\xd5&gt;\t\xa1\x82U{]\xf5\xc2\xbb*\xf4\x15!\xc1\xfby\xcb|^\xd7\xf4\xc2q' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce % ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000183CF8CB890&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1407/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; payload = {'id': '1043b6c7-91dd-421a-b342-67aaf3dcd6e6', 'salt': 'rAiymS2T8mEnzdRNU0SZ6g==', 'secret': 'unit-test-secret', 'timestamp': 1760724664, ...} key = b'\x0bC\xac\x15i:33J\xbb\xb3Zz+\x97&lt;\xf4\x85\xbcaBk\xe0\x8c4M\x04\xb9z\xf7\x0b\xee' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce % ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000183CF8F16D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpl55s983a.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; payload = {'id': '13fe2fb7-7493-4d6c-9e84-4187f4a0334c', 'salt': '3fmu6yYqsUD11PZNy0r/lw==', 'secret': 'test-secret', 'timestamp': 1760724665, ...} key = b'\xe4\x87H\x90\xac\xf9$\xdd$\x1c+\x85o\x052\xe2r\x87A\xc2\xb1\x0b\x95\x05\x89`\xf63=\xb9F_' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce % ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000183CF8F18B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpvwea6oly.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000183CD78E150&gt; payload = {'id': '699e3ae7-c321-4123-a3a4-b3424423608e', 'salt': 'HQe0Yppl79nN4L/lCN8IZw==', 'secret': 'test-secret', 'timestamp': 1760724665, ...} key = b'y\xd6=\xb5\x0c\x82\x16\x1b\xd3\xe7\t\xa1\x8d\x12\xb3w\xd6}\xf8&lt;\xa8~P\xed\x99(\x1a\xe8\x10J=1' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce % ciphertext ^^^^^^^^^^^^^^^^^^ E TypeError: not all arguments converted during bytes formatting robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_607"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_607_1" aria-expanded="false" aria-controls="job_list___sub_collapse_607_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_607_1"><button class="btn btn-outline-danger"><span class="job_id">607 : Job ID aa689ec62b834f458db63f46389b64df</span></button></div></a><div aria-labelledby="job_list___sub_heading_607_1" data-parent="#job_list___sub_accordion_607" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_607_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT % 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_608"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_608_1" aria-expanded="false" aria-controls="job_list___sub_collapse_608_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_608_1"><button class="btn btn-outline-danger"><span class="job_id">608 : Job ID 4d3cdef20ab840ffbe7e3284fd25d931</span></button></div></a><div aria-labelledby="job_list___sub_heading_608_1" data-parent="#job_list___sub_accordion_608" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_608_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start % fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_609"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_609_1" aria-expanded="false" aria-controls="job_list___sub_collapse_609_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_609_1"><button class="btn btn-outline-danger"><span class="job_id">609 : Job ID 9756f0d18e2a407094df84db9f029a04</span></button></div></a><div aria-labelledby="job_list___sub_heading_609_1" data-parent="#job_list___sub_accordion_609" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_609_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE % 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_610"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_610_1" aria-expanded="false" aria-controls="job_list___sub_collapse_610_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_610_1"><button class="btn btn-outline-success"><span class="job_id">610 : Job ID 9946bc54701047a7a0d3436a84019ef0</span></button></div></a><div aria-labelledby="job_list___sub_heading_610_1" data-parent="#job_list___sub_accordion_610" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_610_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE % 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000260F8241880&gt; encrypted_payload = 'sPovFUqD27v8kFt5gb5tC3lbMLl7XHaK4y5RsV2U8DgsddsCqID5xL7zJuzeJ7Zxp/xVtU7BixE7ROTqMjnBmKarAol3qc9Mn2LOB6rnKOa3Vlf/6+ivO.../tmNoaAnkYaIHt682u/LjiS+7IWYN2ZBLotp1mfvlzp/uGru54LAmhhIhkpHnijnzUXpwC+btgeU67zBn6qwf5HlXFoLMx2fTHILCF94wgKUPglpMqHYlj' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE % 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000260FAEBB8C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000260F8241880&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1511/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000260F8241880&gt; encrypted_payload = 'sPovFUqD27v8kFt5gb5tC3lbMLl7XHaK4y5RsV2U8DgsddsCqID5xL7zJuzeJ7Zxp/xVtU7BixE7ROTqMjnBmKarAol3qc9Mn2LOB6rnKOa3Vlf/6+ivO.../tmNoaAnkYaIHt682u/LjiS+7IWYN2ZBLotp1mfvlzp/uGru54LAmhhIhkpHnijnzUXpwC+btgeU67zBn6qwf5HlXFoLMx2fTHILCF94wgKUPglpMqHYlj' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE % 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_611"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_611_1" aria-expanded="false" aria-controls="job_list___sub_collapse_611_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_611_1"><button class="btn btn-outline-success"><span class="job_id">611 : Job ID 60142ba3b91241c28db62ec74860fe12</span></button></div></a><div aria-labelledby="job_list___sub_heading_611_1" data-parent="#job_list___sub_accordion_611" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_611_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE % 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AC4E7C38F0&gt; encrypted_payload = 'Zf6Rthv/rt4mo2JxwYh3UXkZpZk5DdyWBy/eg416v8l64txw/bI+eq3t2dkQl9qn9ybSdgOQ/9cjH9xe/wvKsNuc1HnWolQnLjw85QlP9LwXOfGMwwGeR...Q4Io6pSvc0zQAgZ8kjHFwM8YdgMNck5DY1IRA8ICVgVD0Dv5W0XzzcU6L3LtNPpJOOiJhNWEPrMCtXH//owub8owWRJ/0YcZXLhkz6eIosqkM3DqI/QRfg' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE % 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001AC512EB8F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AC4E7C38F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-922/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AC4E7C38F0&gt; encrypted_payload = 'Zf6Rthv/rt4mo2JxwYh3UXkZpZk5DdyWBy/eg416v8l64txw/bI+eq3t2dkQl9qn9ybSdgOQ/9cjH9xe/wvKsNuc1HnWolQnLjw85QlP9LwXOfGMwwGeR...Q4Io6pSvc0zQAgZ8kjHFwM8YdgMNck5DY1IRA8ICVgVD0Dv5W0XzzcU6L3LtNPpJOOiJhNWEPrMCtXH//owub8owWRJ/0YcZXLhkz6eIosqkM3DqI/QRfg' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE % 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_612"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_612_1" aria-expanded="false" aria-controls="job_list___sub_collapse_612_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_612_1"><button class="btn btn-outline-success"><span class="job_id">612 : Job ID 54312e7b6eae4576bb9081a4524b65f9</span></button></div></a><div aria-labelledby="job_list___sub_heading_612_1" data-parent="#job_list___sub_accordion_612" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_612_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt ** nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e227a69968d1c2ea9: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020F432391C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; payload = {'id': '709c4751-3abb-4d13-b484-1dec97bf8d3b', 'salt': 'BJecz8dzF6uVqSMvwlZq+A==', 'secret': 'unit-test-secret', 'timestamp': 1760733447, ...} key = b'\xd9\xc9Vr\x7f\x8c\x97Y\xb3\x9d\xb0\xdf\x99\r\x89\xdb\x1a\xe8&amp;SmZ\xbd\xf5\xb3\x92\xe4a\xff\xe7\xdc\xe9' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ** nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020F4323B5F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1805/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; payload = {'id': 'f9b5bf4b-574e-4adb-af11-5f88e84ad196', 'salt': 'kUQH14+qFt7fD3yT3hhPHg==', 'secret': 'unit-test-secret', 'timestamp': 1760733448, ...} key = b'\xe3!:\xef\x08u\xf1Q)\xfd\xe5(\x166\xec\x1dR$\x8dv\xed\x90\x8e\x0et\xa9N\xf1\x0e\xa6\xd8\xb4' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ** nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020F43261400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpi40n4yub.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; payload = {'id': 'd7f059f6-64c4-42c8-87be-7bf74601dc0b', 'salt': '3HBO4TNjV+GlfeO4bzKvIg==', 'secret': 'test-secret', 'timestamp': 1760733448, ...} key = b'W\xe6\x86mC7Q\x97\x94t\x07\xe9\x9f\x16\x9eB#\xabv\x1d:6\xa3\x16o\xc1\x83\xd7\xdb\xa5\x9d\xd5' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ** nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020F432615E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpih_nz7yz.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020F4059F050&gt; payload = {'id': '739aba0a-585b-4d4c-a567-ec5acf64c357', 'salt': 'lP9VumrkiQU8WcJkoDiWlA==', 'secret': 'test-secret', 'timestamp': 1760733448, ...} key = b'\xe5Q(\x9e*f\xfb\xce\xd8$\xd237zn%(\x96\xd5\x9b\xf3\xba:w\x00*N\xae\xc9\x9d:\x02' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ** nonce + ciphertext ^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_613"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_613_1" aria-expanded="false" aria-controls="job_list___sub_collapse_613_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_613_1"><button class="btn btn-outline-success"><span class="job_id">613 : Job ID be7161c9515f4a2ea52387636c1b2659</span></button></div></a><div aria-labelledby="job_list___sub_heading_613_1" data-parent="#job_list___sub_accordion_613" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_613_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce ** ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e913c9faf5293f30c: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000015E8C849280&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; payload = {'id': '5ca21c8d-6ed4-463e-9a5a-30e772e72c76', 'salt': 'Ng/2GOWg03tqlbVQqMhvcg==', 'secret': 'unit-test-secret', 'timestamp': 1760714061, ...} key = b'\xf6-\xaej\x8cr\xea\xc3\rZS\xda\xbf\xaaD\x18\nS\xb9\xb009\x1fd\xc0\xcf8 \xc7\x93\xf2-' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ** ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000015E8C84B680&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-931/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; payload = {'id': '0e49864d-9189-4f4c-b42c-b469cfb2d155', 'salt': 'n9LBG2XUym/anlew5g9hnA==', 'secret': 'unit-test-secret', 'timestamp': 1760714062, ...} key = b'\xe7\xa9\xd7\xd0\x1b\x9c#\xc4n\xf0"\xa6o\x88\x883\xcd\xcaI\xefS\xdb|\xc20oCx\x9b\xba8"' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ** ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000015E8C871490&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpskexq8_n.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; payload = {'id': '4d961a5e-342c-4c80-b9cf-be0626162add', 'salt': 'T50cpwyCEiVURECdp6yXxQ==', 'secret': 'test-secret', 'timestamp': 1760714062, ...} key = b'Lx\xcfbA\x18\x00\x02\xbfyN5w\xe7jL;+\xc1Q\xb0a\x82\xc8\xc9\x82\x81V\r\xb9\xb7\xff' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ** ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000015E8C871670&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpd7_xgbvs.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015E89C558E0&gt; payload = {'id': '70336171-6c7e-4600-9e32-a247e3216e64', 'salt': 'b5EJcHcBKuwmbZucgrACIA==', 'secret': 'test-secret', 'timestamp': 1760714062, ...} key = b'f&lt;!\xa4\x8c?\xdf\x97\xc4\x9f\x9f \xc8\x132p\x84\x82\x01\xa2\r+\xea\xf5c\xfd\x9b\xfdT\x87\x90\xfd' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ** ciphertext ^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_614"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_614_1" aria-expanded="false" aria-controls="job_list___sub_collapse_614_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_614_1"><button class="btn btn-outline-danger"><span class="job_id">614 : Job ID efd14616e53c4ed6ab9165239aa919df</span></button></div></a><div aria-labelledby="job_list___sub_heading_614_1" data-parent="#job_list___sub_accordion_614" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_614_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT ** 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_615"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_615_1" aria-expanded="false" aria-controls="job_list___sub_collapse_615_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_615_1"><button class="btn btn-outline-danger"><span class="job_id">615 : Job ID 16b2fcb46d5c46709d9a1e1e89de66d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_615_1" data-parent="#job_list___sub_accordion_615" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_615_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start ** fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_616"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_616_1" aria-expanded="false" aria-controls="job_list___sub_collapse_616_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_616_1"><button class="btn btn-outline-success"><span class="job_id">616 : Job ID 85e2f733d71c48e59301f0569000d111</span></button></div></a><div aria-labelledby="job_list___sub_heading_616_1" data-parent="#job_list___sub_accordion_616" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_616_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE ** 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.........F.................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195217585029Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195218486925Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000017A880F78F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017A87F621B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1687/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017A87F621B0&gt; encrypted_payload = '7CQu6yM7a85IY4fMeiuTPksrbbOP5gwHqp1/YOa0cq31QD9a0h70rk1lcbiS1k/ivt5MIjQdgAhaugb+AUOXEsAUCQxn3VNIjQ69bF2CrbeIJbe9DdrYA...RhAyDGb6QYlJ3F9DxLnl+J9s2p1YS1A2JkGMgabWc0c+r6vvNK2ynDHWBwjeFqkbCrbQPjGq1cq4bWT/mpWPx7vZKg4ZWFwgkJFjLh/gZ0BuIEPTYc+Slp' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE ** 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 11 failed, 31 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_617"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_617_1" aria-expanded="false" aria-controls="job_list___sub_collapse_617_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_617_1"><button class="btn btn-outline-success"><span class="job_id">617 : Job ID 9e0cd68682b74cfda573ab9c63b65d3a</span></button></div></a><div aria-labelledby="job_list___sub_heading_617_1" data-parent="#job_list___sub_accordion_617" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_617_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE ** 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026C17D21BB0&gt; encrypted_payload = 'wEQKeSGiaRhDj8Y9nOvgm2cFyZf+pnvY6xGAaBLlO5ysU+YeTI5wv9ub4CMeWaIDPUCxeXtfiDFgY3oAlu/17qNdTB2oqETsWJo/X6TlSMFYlmMKXm+aM...db3Mqsc7zpeI8QSEyN9LJ7d0RBZd4eL87RZU749l1rm+0UWkBjym14+DI5PCBp1g7UM5kq373urJYp/8n9PnsfEzNsUjMWtPS72jWIMejMlcF3/bki+U2N' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE ** 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026C1A98B6E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026C17D21BB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1341/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026C17D21BB0&gt; encrypted_payload = 'wEQKeSGiaRhDj8Y9nOvgm2cFyZf+pnvY6xGAaBLlO5ysU+YeTI5wv9ub4CMeWaIDPUCxeXtfiDFgY3oAlu/17qNdTB2oqETsWJo/X6TlSMFYlmMKXm+aM...db3Mqsc7zpeI8QSEyN9LJ7d0RBZd4eL87RZU749l1rm+0UWkBjym14+DI5PCBp1g7UM5kq373urJYp/8n9PnsfEzNsUjMWtPS72jWIMejMlcF3/bki+U2N' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE ** 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_618"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_618_1" aria-expanded="false" aria-controls="job_list___sub_collapse_618_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_618_1"><button class="btn btn-outline-success"><span class="job_id">618 : Job ID 03d83b63a7934dbfac9403becf96c545</span></button></div></a><div aria-labelledby="job_list___sub_heading_618_1" data-parent="#job_list___sub_accordion_618" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_618_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE ** 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021DEDA021B0&gt; encrypted_payload = 'vZNVju/QfzqF1Mt1oDaV7roqF+EceLPV1wZuPrgafETVMfswyFHsFzA+gB0b7xoFiDzVhopWUcIYlGty2aYeCmz4l+PU4LhzvQQWH+5jdMGrDs8SVLGGc...daCEQ0pGj4F00mqVLlXGNLtoX13KgOVD4YmXlcbYN3wUUrfLSAQRG2aWyzg+i946SzIShfXApgo1R6l1NVfzQ7xr7QPnSNIRGeKrWWfC+fHWLE51G6GY/J' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE ** 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021DEDB97920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021DEDA021B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1795/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021DEDA021B0&gt; encrypted_payload = 'vZNVju/QfzqF1Mt1oDaV7roqF+EceLPV1wZuPrgafETVMfswyFHsFzA+gB0b7xoFiDzVhopWUcIYlGty2aYeCmz4l+PU4LhzvQQWH+5jdMGrDs8SVLGGc...daCEQ0pGj4F00mqVLlXGNLtoX13KgOVD4YmXlcbYN3wUUrfLSAQRG2aWyzg+i946SzIShfXApgo1R6l1NVfzQ7xr7QPnSNIRGeKrWWfC+fHWLE51G6GY/J' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE ** 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_619"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_619_1" aria-expanded="false" aria-controls="job_list___sub_collapse_619_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_619_1"><button class="btn btn-outline-success"><span class="job_id">619 : Job ID 06dab06ca983465fb770a7f5a07be55c</span></button></div></a><div aria-labelledby="job_list___sub_heading_619_1" data-parent="#job_list___sub_accordion_619" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_619_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt &gt;&gt; nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ebae0649552375f6c: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000228D4DE5700&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; payload = {'id': '6df7be91-36c3-4744-8fbf-00f7b0eac74b', 'salt': '8jnuVcA5l82QHyuiFz6i1w==', 'secret': 'unit-test-secret', 'timestamp': 1760713253, ...} key = b'\xe8\x91$a%jrhWY{A#\xb7{\xa3\xdf&gt;\x98\xcb\xae\xa7\x1e\xd6\xc3\x03E\x0f2\xc6\tq' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &gt;&gt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000228D4DE7A10&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-893/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; payload = {'id': '2505eb58-9536-474e-ba0a-0df754cf4000', 'salt': '6NPL9UllqiHMEimyZi8U6Q==', 'secret': 'unit-test-secret', 'timestamp': 1760713253, ...} key = b'\xdc\x05\xc7M\xc5\x0e\xc9Z\xce\xe8\xcb\x1f\xe5/m\x0c\x0f\xd0@\xc3\xfa\xdc\xc1\x11IN\xf0~\x847\xabO' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &gt;&gt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000228D4E0D820&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp44byez2k.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; payload = {'id': '7b3997ab-1cc1-4b6e-93f4-10b471c13381', 'salt': 'zAaa4PvsyUjg3v8A2ZIRDw==', 'secret': 'test-secret', 'timestamp': 1760713253, ...} key = b'=1\xc6\xee\xed%\x10\xb1\x9f\xb8\xe8\x7f\xe2\xebmYz2N\xba\x9d\x15\xfa\xear\x05 5?&amp;%\xe2' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &gt;&gt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000228D4E0DA00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmppmzgkps1.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000228D4C6A1B0&gt; payload = {'id': 'a97067ea-3394-499b-84ff-3b7833613dfe', 'salt': 'USlNBh3c6yFwnxd8+t8ESg==', 'secret': 'test-secret', 'timestamp': 1760713253, ...} key = b'\x13\x11X\x9e\xa7\xb5\xb7D8EKi\xec+*w\x11\x9d\xe6\x88\xa5\x17\xd4\r\x99\x15\x96,\xdci\x19m' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &gt;&gt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_620"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_620_1" aria-expanded="false" aria-controls="job_list___sub_collapse_620_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_620_1"><button class="btn btn-outline-success"><span class="job_id">620 : Job ID 7dbf01c635c94fcfbecdd3e756a4d20f</span></button></div></a><div aria-labelledby="job_list___sub_heading_620_1" data-parent="#job_list___sub_accordion_620" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_620_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce &gt;&gt; ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef2a2715d6685f8c7: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026599F057C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; payload = {'id': 'cc766d23-22d7-462d-b3d5-3a06778606ca', 'salt': 'j9t/z/4FnT4U4pHk21hHkw==', 'secret': 'unit-test-secret', 'timestamp': 1760725672, ...} key = b'\xec+0\xb0\xb1$l\xa8\x93\xfbA\xad\x81[\x81q\xf8\x81\xea\xab\xbc~mK\xe0\x87K)=\xa9\x10\xc0' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &gt;&gt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026599F07B00&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1453/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; payload = {'id': '8bd67f7f-0ce4-40f1-91ac-e5e20f1d8516', 'salt': 'tRSCI/ljPbSqabJHpfutlQ==', 'secret': 'unit-test-secret', 'timestamp': 1760725673, ...} key = b'\x93\x06S\xa2\xe9\x8d,\xa0\xbe-\xefJ&lt;\x87\xa8\x13\xf7\xfc\x17\xb0\xd7\xfd\xb1\xa4\x81\xc5\x1c\x8c\x054\x12\xe7' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &gt;&gt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026599F29910&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpse61y2_4.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; payload = {'id': 'd32d896d-2bdd-4524-ad97-39aa7bf3ded8', 'salt': '5LRqi0lF1/bD8hm2I9ST4w==', 'secret': 'test-secret', 'timestamp': 1760725673, ...} key = b'\x8f\x9a\x1f\x94Y\x06C\x01\xfa\xad(\xf4\x80\x8d\x85L\xe6S\xae\xf6\xe5\xc7=\xb0\xd0\xeb\x1bxb\xc4-\\' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &gt;&gt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026599F29AF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpyovj9mv_.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026599D721B0&gt; payload = {'id': '3442af69-a568-497b-8b1d-6cbc803e12dc', 'salt': '1qg6gtCRi5BOu3xXMaMC3Q==', 'secret': 'test-secret', 'timestamp': 1760725673, ...} key = b"\xc8\x03\xac6'\xcb\x86DB\x93Mdsz4'\x9d\x06.\x83\xa7qY\xe1\x80\xf7\x9a\x15\x85G\x9e(" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &gt;&gt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_621"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_621_1" aria-expanded="false" aria-controls="job_list___sub_collapse_621_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_621_1"><button class="btn btn-outline-danger"><span class="job_id">621 : Job ID f03c2640c17247a08014740182815088</span></button></div></a><div aria-labelledby="job_list___sub_heading_621_1" data-parent="#job_list___sub_accordion_621" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_621_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT &gt;&gt; 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_622"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_622_1" aria-expanded="false" aria-controls="job_list___sub_collapse_622_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_622_1"><button class="btn btn-outline-danger"><span class="job_id">622 : Job ID eee5919d9b274709af474c10537375b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_622_1" data-parent="#job_list___sub_accordion_622" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_622_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start &gt;&gt; fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_623"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_623_1" aria-expanded="false" aria-controls="job_list___sub_collapse_623_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_623_1"><button class="btn btn-outline-danger"><span class="job_id">623 : Job ID d71ee3cff91040528ae8284e4ae12d99</span></button></div></a><div aria-labelledby="job_list___sub_heading_623_1" data-parent="#job_list___sub_accordion_623" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_623_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE &gt;&gt; 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_624"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_624_1" aria-expanded="false" aria-controls="job_list___sub_collapse_624_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_624_1"><button class="btn btn-outline-success"><span class="job_id">624 : Job ID 00809bb3e1804b4fbd0fba280e78ee7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_624_1" data-parent="#job_list___sub_accordion_624" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_624_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &gt;&gt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015921715850&gt; encrypted_payload = 'ExIDF4DOUWNYMtHMOZjw9FN3sEEBnoQ5+v3y8UhQsg5f3RAtwbrIYajKjmT5W+nLukkm3RvT7aQGjJPL6+SHInH5sNl3P1nVZDjUnXdfA7OALD4kYhd9C...2/J9MclZRIaGvyCNQjGiKFmEhhY99keB9MziYazhdAem7MAQpVeCQRuoMM9a4R1UcMxJ9NxTIqgb27NHAqahJtnRp72+2I3ek/SCVIVNNAxiV7R6p9Gd5a' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &gt;&gt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001592430B530&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015921715850&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-420/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000015921715850&gt; encrypted_payload = 'ExIDF4DOUWNYMtHMOZjw9FN3sEEBnoQ5+v3y8UhQsg5f3RAtwbrIYajKjmT5W+nLukkm3RvT7aQGjJPL6+SHInH5sNl3P1nVZDjUnXdfA7OALD4kYhd9C...2/J9MclZRIaGvyCNQjGiKFmEhhY99keB9MziYazhdAem7MAQpVeCQRuoMM9a4R1UcMxJ9NxTIqgb27NHAqahJtnRp72+2I3ek/SCVIVNNAxiV7R6p9Gd5a' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &gt;&gt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_625"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_625_1" aria-expanded="false" aria-controls="job_list___sub_collapse_625_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_625_1"><button class="btn btn-outline-success"><span class="job_id">625 : Job ID 07539cee063f4065957757acb8b2cd19</span></button></div></a><div aria-labelledby="job_list___sub_heading_625_1" data-parent="#job_list___sub_accordion_625" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_625_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE &gt;&gt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001CECDC52120&gt; encrypted_payload = 'kFKBIu4jzqjKm6c9Rk3WPM0EKQfye0gb/8fL+C31cyoKpAhjJXxOSqmrRW17MR6CHmsCfGaLDnK0QMLz+UnKnk0fDSN14bsKvscv+VuPNvTyJQ9bwPyFO...A1gjm9vjKepqyBUJc8xD2eCzs7xkA3cq+nwOStSkz6sOIm7kpcdiwl73luF4Fc9vhJ3dywwGkzvWVxcxaDqynzf27T6RhrgU9iIl9sR2tOL4x1Wk3tvzoE' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &gt;&gt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CED08BB920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001CECDC52120&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1560/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001CECDC52120&gt; encrypted_payload = 'kFKBIu4jzqjKm6c9Rk3WPM0EKQfye0gb/8fL+C31cyoKpAhjJXxOSqmrRW17MR6CHmsCfGaLDnK0QMLz+UnKnk0fDSN14bsKvscv+VuPNvTyJQ9bwPyFO...A1gjm9vjKepqyBUJc8xD2eCzs7xkA3cq+nwOStSkz6sOIm7kpcdiwl73luF4Fc9vhJ3dywwGkzvWVxcxaDqynzf27T6RhrgU9iIl9sR2tOL4x1Wk3tvzoE' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &gt;&gt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_626"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_626_1" aria-expanded="false" aria-controls="job_list___sub_collapse_626_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_626_1"><button class="btn btn-outline-success"><span class="job_id">626 : Job ID f5539fc45d0942768ef4f63b9cb54a8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_626_1" data-parent="#job_list___sub_accordion_626" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_626_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt &lt;&lt; nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e82c24a40f195b5fc: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020B399455B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; payload = {'id': '61476292-db23-4804-87aa-b672aa80919b', 'salt': 'EmR/qTYG3oZ59ZEzG+CmMg==', 'secret': 'unit-test-secret', 'timestamp': 1760747347, ...} key = b'z\xd2\x16\xb1Z\xe5\x19\xfb-\xcfo\x87\xeaZ{\xff\x1b\x80;H\xc3qZ{]9/\x7f!\xb2\n/' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &lt;&lt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020B399479E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2430/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; payload = {'id': '6ed7db32-8aeb-4d1b-b1b3-8c8d1f07d638', 'salt': 'Rmr/vZsGZYG+b4z81zR6jg==', 'secret': 'unit-test-secret', 'timestamp': 1760747347, ...} key = b'\x10\x01*x\x053* \x94\x15`\xf9o\xf9{\x16i\xd1pl\x9aS8\xdd\x9e\x89\x8dSO&gt;\xb9\xa6' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &lt;&lt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020B3996D7C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp01cp8ij0.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; payload = {'id': '80495632-d7b2-475a-97bc-72d4c8f40a0f', 'salt': '7Cq+aHFvw5cV6UGUQM5/6A==', 'secret': 'test-secret', 'timestamp': 1760747348, ...} key = b'+?\x0b\x99\x1d\xe4\xd0\x14\xbb\xce\xa2\x9a\xdd\x84&gt;\xce\xb0\xc8\x1d6V9\x04\xa4\xeey\xc2\x90\x16V\xecL' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &lt;&lt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020B3996D9A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpbozz2u7n.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000020B397CA1B0&gt; payload = {'id': '7562051c-5f13-40ac-89b0-bc692b3f5181', 'salt': 'oNrb+ZPK2Pk/cP4tR3zgUg==', 'secret': 'test-secret', 'timestamp': 1760747348, ...} key = b'\xc4Q\x8f\xd0\x9aj\x10\xbf\xe5r\x03r\xf2\xd6\xbf\x13\x06\xb7A\xa0w\xbf\x11\xc0\xe1\x1f5\x94\x97Y\xbfq' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &lt;&lt; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 21.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_627"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_627_1" aria-expanded="false" aria-controls="job_list___sub_collapse_627_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_627_1"><button class="btn btn-outline-success"><span class="job_id">627 : Job ID ed23fa39acac4d07a86720e3806def27</span></button></div></a><div aria-labelledby="job_list___sub_heading_627_1" data-parent="#job_list___sub_accordion_627" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_627_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce &lt;&lt; ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6ace21cfe5425442: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002AF881895B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; payload = {'id': 'b63c3e60-598f-4013-80e9-7d47ad0bf54c', 'salt': 'BAOcNv0gTvz8J6nI0YkCXA==', 'secret': 'unit-test-secret', 'timestamp': 1760704143, ...} key = b'2\x01\xadA\x10\xf1\t\xe9\x93v;u\x95boD\xbf\x92i\x9e\xb0\xbb?\x9e/@\xc7\x03W\xc2,\xc7' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &lt;&lt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002AF8818B740&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-477/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; payload = {'id': '8cb045e6-be62-4fc4-ad1b-09c0954a03d7', 'salt': '0zbIBOSWIRUwDu46qPjK4g==', 'secret': 'unit-test-secret', 'timestamp': 1760704143, ...} key = b'\xd9+\x0b\xa9l\xcaq\x94\tM]\x9f`I\x16\xb4\x84\x8f3\xfa!Q\xf4P\x9d[B\x05\x81"\x88\x03' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &lt;&lt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002AF881B1550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp9kh6aid_.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; payload = {'id': 'fb23e727-2e32-49a8-879f-79c788dd5b42', 'salt': 'pqrhsnB+dHUZor6W6TKQvw==', 'secret': 'test-secret', 'timestamp': 1760704143, ...} key = b'\xd8t\x9fG}\x877\xf2[\x08\x14\xed\xd6G2\xdc\x90f*\xcfS\xf1\xc6A\xf6\xb0\xa2\xf3Q\x92\xec\xaf' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &lt;&lt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002AF881B1730&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp37xkx39q.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002AF8566E510&gt; payload = {'id': '82a53203-20f3-47f2-a4ad-4d56320cc759', 'salt': '6QCJ/TjRfutRRh4JHBlGMA==', 'secret': 'test-secret', 'timestamp': 1760704143, ...} key = b'{\x96\xb4 d\x19a\xe1\xb4\x93D\x1c@q\x87\x8e$Fm\xd5@0\x92\xec9LE\xb4\xf0\xaaP\x80' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &lt;&lt; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 21.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_628"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_628_1" aria-expanded="false" aria-controls="job_list___sub_collapse_628_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_628_1"><button class="btn btn-outline-danger"><span class="job_id">628 : Job ID 3313c9a9fc204519a910aac12d9a2dd2</span></button></div></a><div aria-labelledby="job_list___sub_heading_628_1" data-parent="#job_list___sub_accordion_628" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_628_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT &lt;&lt; 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_629"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_629_1" aria-expanded="false" aria-controls="job_list___sub_collapse_629_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_629_1"><button class="btn btn-outline-danger"><span class="job_id">629 : Job ID dce03df6a3cd4e2ba996346e182166d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_629_1" data-parent="#job_list___sub_accordion_629" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_629_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start &lt;&lt; fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_630"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_630_1" aria-expanded="false" aria-controls="job_list___sub_collapse_630_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_630_1"><button class="btn btn-outline-success"><span class="job_id">630 : Job ID 3ffc070bf2814eebac6fa1f2a84184f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_630_1" data-parent="#job_list___sub_accordion_630" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_630_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE &lt;&lt; 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000200FCF1B620&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000200F9EB6FC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-772/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000200F9EB6FC0&gt; encrypted_payload = 'OBldh1nfAG6DsWoQhhFAVRwb/BRUHe8WfMnw9PqTBaX2qjtXgGKXpVTjcqon0KTPRGAuWz0jwcnxm+FdOSlT6gyF4dvgNRLd3pQznvRYPBoy/k9Atse1F...jig1lyt51o5NpTXDY70B/MoqUNfB51dSL37/CfbgfInC0DERHAtqiaqrWjJ4e7Z5S1xG75gUU2Fy05Z+WY5FUPbAfwdDq/TYCzN8imtFLFhoiLDvX5+0m/' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE &lt;&lt; 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_631"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_631_1" aria-expanded="false" aria-controls="job_list___sub_collapse_631_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_631_1"><button class="btn btn-outline-success"><span class="job_id">631 : Job ID ab65aa240cfc4cd19cce36b270295401</span></button></div></a><div aria-labelledby="job_list___sub_heading_631_1" data-parent="#job_list___sub_accordion_631" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_631_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &lt;&lt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002683EE3A240&gt; encrypted_payload = 'qXNdQqzDXCOQhk6eaMTt921gmAU8gFTm9jpAthiQoXyyZgiHHkipZ5aNxCY2kzPWML7cpAvlxZX7lmHmx2fWzKR5j+cj7zTE9U5twlhscUijYsiVihkaV...UY7VN0pSKwIGSBtKR+dFIeyNevKupEFIvnE17W6BaO05VUVlEhLl8EXHh/c7iCCEXngdwH2SHx4KOFPds4brDtVoicjEXKaMPwUFLs+AAn/m9XFyrt4hwQ' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &lt;&lt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002684193B4A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002683EE3A240&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-676/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002683EE3A240&gt; encrypted_payload = 'qXNdQqzDXCOQhk6eaMTt921gmAU8gFTm9jpAthiQoXyyZgiHHkipZ5aNxCY2kzPWML7cpAvlxZX7lmHmx2fWzKR5j+cj7zTE9U5twlhscUijYsiVihkaV...UY7VN0pSKwIGSBtKR+dFIeyNevKupEFIvnE17W6BaO05VUVlEhLl8EXHh/c7iCCEXngdwH2SHx4KOFPds4brDtVoicjEXKaMPwUFLs+AAn/m9XFyrt4hwQ' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &lt;&lt; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_632"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_632_1" aria-expanded="false" aria-controls="job_list___sub_collapse_632_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_632_1"><button class="btn btn-outline-success"><span class="job_id">632 : Job ID dd39c61a87b7457b8f99e2872bf0cdc4</span></button></div></a><div aria-labelledby="job_list___sub_heading_632_1" data-parent="#job_list___sub_accordion_632" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_632_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE &lt;&lt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.........F.................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154513597784Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154514562070Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EE76949820&gt; encrypted_payload = 'xrqLbwM0w4tyJtsAbPlOHy0cCFQviWMHJ3GrCFkehKJspbRByfM4gVvURhp4u5HhKIE2TWiHSwvklrSHKg4vmZlOR5bpZR9p9uPCS2bND7GeHJ25pt4X6...e6psTlhBbQeprE2XrYc2Bq5WVvrBUrU1anMiZb40Tf8OX2/bHM2AHC/yesDLQlKdZOn7cVi3AlMFNXIiztsqhq1F6mmlwaQJ5mASRMg4siY2XrYSTkANi8' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &lt;&lt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EE795EB800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EE76949820&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1014/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EE76949820&gt; encrypted_payload = 'xrqLbwM0w4tyJtsAbPlOHy0cCFQviWMHJ3GrCFkehKJspbRByfM4gVvURhp4u5HhKIE2TWiHSwvklrSHKg4vmZlOR5bpZR9p9uPCS2bND7GeHJ25pt4X6...e6psTlhBbQeprE2XrYc2Bq5WVvrBUrU1anMiZb40Tf8OX2/bHM2AHC/yesDLQlKdZOn7cVi3AlMFNXIiztsqhq1F6mmlwaQJ5mASRMg4siY2XrYSTkANi8' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &lt;&lt; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 11 failed, 31 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_633"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_633_1" aria-expanded="false" aria-controls="job_list___sub_collapse_633_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_633_1"><button class="btn btn-outline-success"><span class="job_id">633 : Job ID 4aa3a9a9e48743ad968d898049007248</span></button></div></a><div aria-labelledby="job_list___sub_heading_633_1" data-parent="#job_list___sub_accordion_633" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_633_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt | nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for |: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec3bf713e25e585db: unsupported operand type(s) for |: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F661FA5910&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; payload = {'id': 'c1a022fd-a682-4363-9e3e-357c89d2902c', 'salt': 'Za+uyV+ouHZETLH67dOi7g==', 'secret': 'unit-test-secret', 'timestamp': 1760726157, ...} key = b'\xd62\x8d\x19\xd3b\xe1\x972\xa0\t\xd4\x92jQ\xe48OR&gt;F\xe0\x1b\x85\x19\xfcU/@\xfew\xf7' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt | nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F661FA7A10&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1475/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; payload = {'id': '8738d30e-53d7-430d-9466-65a3dd7e8942', 'salt': '5PvKKrAkJAglEHMzqQxbeQ==', 'secret': 'unit-test-secret', 'timestamp': 1760726157, ...} key = b';\xa3J\x83\xa2)\x1fQ\xfd\x86\xf4\xe11\x17n\x10(R\x1d\xa6)\x82\xc4;t\x8ep\xcd\xcaIZ\x19' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt | nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F661FCD850&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpou4cej6u.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; payload = {'id': 'aa132b89-9a35-49f6-a6ec-1f91336b3975', 'salt': 'Eu1jt/JdcMhxOdMEJKffKw==', 'secret': 'test-secret', 'timestamp': 1760726157, ...} key = b'\x05_\x85\xe1e5;bD\xce\x17+\xd5T|&gt;\x9d\x84\xa82\x82\x89\xb8\xe0\xf4\xd2\xbd#\xa3\xae\xa6\x01' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt | nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F661FCDA30&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkhemurpr.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F65F5EDFD0&gt; payload = {'id': '6f390fd4-8e7f-4664-a937-4fadac6d4bdf', 'salt': 'tPQ8abgdw8SG3mTpbFxogg==', 'secret': 'test-secret', 'timestamp': 1760726158, ...} key = b"\x1a\xca\xa8\xc9\x86RFF\xf0\xef\xc8^\xe6\xb3\xc7'\xaf\x93ZU\x11Ut\x14\x05\xe9J\x0f\x1aY\xdbe" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt | nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_634"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_634_1" aria-expanded="false" aria-controls="job_list___sub_collapse_634_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_634_1"><button class="btn btn-outline-success"><span class="job_id">634 : Job ID 32fb60982d4a4c20b40f696e3cd9d318</span></button></div></a><div aria-labelledby="job_list___sub_heading_634_1" data-parent="#job_list___sub_accordion_634" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_634_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce | ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for |: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e7c96ea7f1f7f3365: unsupported operand type(s) for |: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B44E0456A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; payload = {'id': '05e2199f-1d32-4261-8668-6f0760c6f2fc', 'salt': 'xgwI8i51yCFyyPzcbY8Paw==', 'secret': 'unit-test-secret', 'timestamp': 1760726091, ...} key = b'1\xfa\x8f\x8aYN\x18]#\xa7\xbf&gt;\xac\xdf\x89\x0f }kM#\xe0@\x85\xd6\xd4\x1e$\xd0}\x07\xe3' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce | ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B44E047920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1472/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; payload = {'id': '4d8ae092-6afe-452e-aea0-e10e55e4e81d', 'salt': 'okyTFSe2Ufi5c5z1iNHIRg==', 'secret': 'unit-test-secret', 'timestamp': 1760726091, ...} key = b"%\xe2{\xfe\xda\xa4,Z\x01Z\x1a\x91\xfd\x13l\xe1\xbe'1\x93\x0bT\xb0WM\xfb\x0c&lt;[\x7fm\xd0" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce | ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B44E071760&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmptvktmg_h.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; payload = {'id': '76c77d86-fc4f-471d-b66a-9db6e41e865f', 'salt': 'lbdg0fZmj3ygTmTdDXzr8Q==', 'secret': 'test-secret', 'timestamp': 1760726092, ...} key = b'(T\xe3\xdf\x92}\xbbk\xa90\xdf\xfd\xe5S\r\xb8\xa85m\x90\xa2\x06\x89\x1e}\x06~\xde\x06x\x13\\' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce | ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B44E071940&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpcfckrvw3.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B44B51A780&gt; payload = {'id': 'e8ac1240-32ab-41c3-9c1b-de928242369d', 'salt': '49nCWHaFMxaYSc6WBqRahQ==', 'secret': 'test-secret', 'timestamp': 1760726092, ...} key = b'k\xad\x80\xafb\xc3[F\xfd\xd1\xe8Q\xb7\x1f/\xea\xfb\x80J\xb8\x05\xd3\xd0AmO\x87\x95\xd5\xd1\x18\x16' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce | ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_635"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_635_1" aria-expanded="false" aria-controls="job_list___sub_collapse_635_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_635_1"><button class="btn btn-outline-danger"><span class="job_id">635 : Job ID 5e0c5bad46244df29b3ffb4a096b1b7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_635_1" data-parent="#job_list___sub_accordion_635" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_635_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT | 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_636"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_636_1" aria-expanded="false" aria-controls="job_list___sub_collapse_636_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_636_1"><button class="btn btn-outline-danger"><span class="job_id">636 : Job ID 3e871edd50ad41198a5873970e369319</span></button></div></a><div aria-labelledby="job_list___sub_heading_636_1" data-parent="#job_list___sub_accordion_636" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_636_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start | fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_637"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_637_1" aria-expanded="false" aria-controls="job_list___sub_collapse_637_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_637_1"><button class="btn btn-outline-danger"><span class="job_id">637 : Job ID 689dc0524dd946e2b1197f702e6f7e07</span></button></div></a><div aria-labelledby="job_list___sub_heading_637_1" data-parent="#job_list___sub_accordion_637" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_637_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE | 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_638"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_638_1" aria-expanded="false" aria-controls="job_list___sub_collapse_638_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_638_1"><button class="btn btn-outline-danger"><span class="job_id">638 : Job ID 84483bdd04df4d6292a739dc9ca4255a</span></button></div></a><div aria-labelledby="job_list___sub_heading_638_1" data-parent="#job_list___sub_accordion_638" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_638_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE | 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_639"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_639_1" aria-expanded="false" aria-controls="job_list___sub_collapse_639_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_639_1"><button class="btn btn-outline-danger"><span class="job_id">639 : Job ID 7e500f51b68741c088a7fa3d16cb39fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_639_1" data-parent="#job_list___sub_accordion_639" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_639_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE | 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_640"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_640_1" aria-expanded="false" aria-controls="job_list___sub_collapse_640_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_640_1"><button class="btn btn-outline-success"><span class="job_id">640 : Job ID 265a4d8da5104960b63cf487d025b383</span></button></div></a><div aria-labelledby="job_list___sub_heading_640_1" data-parent="#job_list___sub_accordion_640" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_640_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt &amp; nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb8fd03ee1f05b5cd: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000212817B57F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; payload = {'id': '69e3c3ca-5631-48a0-bb37-1943632105a7', 'salt': 'oSIJmDvHuMEVnl1/57C9cQ==', 'secret': 'unit-test-secret', 'timestamp': 1760734202, ...} key = b'c\x1b17\x17\xac\xb6\xa3ap\xb6\x14\x839\xf5\x83\xfa\xdc#\x9a5\x933\xc3\x92\xe5\x8aI\xe2r\xf7\xea' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &amp; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000212817B79B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1840/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; payload = {'id': 'f82c0847-ee65-44c4-b887-fde2455c2b62', 'salt': 'TtanzICMMyIQx16fUnUlng==', 'secret': 'unit-test-secret', 'timestamp': 1760734202, ...} key = b'\x88\x9c\xcd\xd0\x9c\x1c\x90\xef\x91\xd3,?3\x0c\xd6\xdc\x98\xdb\xa8\xd6)wk\xe2|\xd8A\x065\t\xe5\xe6' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &amp; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000212817DD7F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmps_0eu_5c.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; payload = {'id': 'c844d0c2-0b8b-4404-8e88-57cb3772df74', 'salt': 'i11FRIV4n5dOpu6GqM20Qg==', 'secret': 'test-secret', 'timestamp': 1760734203, ...} key = b'\xc9\xb9iJ$\xeaA]\xde\xde/\xca\xb6&gt;\xc4&gt;\xcc\t\xde\xbc*\xc0\x04\xc9\xee:\xd7\xa8\x12\xd3\x01\x11' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &amp; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000212817DD9D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp319r1sup.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002128066DF40&gt; payload = {'id': 'c50de514-ce1f-4b16-9b72-1703f3e8a933', 'salt': 'w1ndBHPhXsiccf3Gp9tw+g==', 'secret': 'test-secret', 'timestamp': 1760734203, ...} key = b'\xf6\xe5\xb8\xaei?p\x05\x04=\x14a\x1f\x90\xa1\xedz*\x0b\xda\x19\xff\xc2\xff\x99\xd5P\x8e\xce\xba\xc7\xf3' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt &amp; nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_641"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_641_1" aria-expanded="false" aria-controls="job_list___sub_collapse_641_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_641_1"><button class="btn btn-outline-success"><span class="job_id">641 : Job ID 70620aff082a46bda5bae1bc4eee54b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_641_1" data-parent="#job_list___sub_accordion_641" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_641_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce &amp; ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eb667c113fc047320: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F261E895B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; payload = {'id': 'f6a26f97-cbe4-47d0-aa5e-b5f10f529c3d', 'salt': 'P6vLRygxNlDXAi+FuwFnzQ==', 'secret': 'unit-test-secret', 'timestamp': 1760720423, ...} key = b'\x8f*\xf15\xf5+Bw\x03\xdb\x0egw*)\xb0\xbd\x1d\x16P\xb1\x19Y\x98\x90\xfbb\xbaK\xfb\x8a\xaa' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &amp; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F261E8B8C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1217/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; payload = {'id': 'faae92e5-3f36-4db1-89a3-b4b407ea3d7c', 'salt': 'n7ml2/zM9zZEKdovtn7jnA==', 'secret': 'unit-test-secret', 'timestamp': 1760720423, ...} key = b'\x05\x868\x9au\xd9\x93\t"\x95\x1b\xbdo1s\xf7\x15s\xe7\x12\x1eo\x17\xd5\x80\xa3\x02\xfd\x96w\xd5\x8f' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &amp; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F261EB1700&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmppwvtb7ec.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; payload = {'id': 'bed23623-72d8-470b-a727-1067e1ad8001', 'salt': 'iV3XVDwuLROpefC9H1YJdQ==', 'secret': 'test-secret', 'timestamp': 1760720423, ...} key = b'\xeeZ\x00\x14\\\x0e\x87.z\xf8!\x13\x12t\xb3\x13^\xd8lWtl8\x84I[\x04\x9af*n\xf2' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &amp; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F261EB18E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp3n68w4k2.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F261CF21B0&gt; payload = {'id': 'a51ad0a3-9d01-4522-992a-b256f6865c87', 'salt': 'lHM1u1NOb5HAsi3G6vJu5A==', 'secret': 'test-secret', 'timestamp': 1760720424, ...} key = b'\xea6\r0\x96\x94\xbf08\x9b\xc7\xda_y;\x9e\x9e\xc0\xb1%/\xe8z\xe7\x04\xb8\r\xb1\xa2\xbaY\x87' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce &amp; ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_642"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_642_1" aria-expanded="false" aria-controls="job_list___sub_collapse_642_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_642_1"><button class="btn btn-outline-danger"><span class="job_id">642 : Job ID 9b3b57e051414860a6cb53e75d6d2c71</span></button></div></a><div aria-labelledby="job_list___sub_heading_642_1" data-parent="#job_list___sub_accordion_642" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_642_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT &amp; 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_643"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_643_1" aria-expanded="false" aria-controls="job_list___sub_collapse_643_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_643_1"><button class="btn btn-outline-danger"><span class="job_id">643 : Job ID aee11ea2bb214becb3020511d1d6d625</span></button></div></a><div aria-labelledby="job_list___sub_heading_643_1" data-parent="#job_list___sub_accordion_643" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_643_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start &amp; fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_644"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_644_1" aria-expanded="false" aria-controls="job_list___sub_collapse_644_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_644_1"><button class="btn btn-outline-danger"><span class="job_id">644 : Job ID 5a19982e74bc4c46999de8f7b527e63b</span></button></div></a><div aria-labelledby="job_list___sub_heading_644_1" data-parent="#job_list___sub_accordion_644" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_644_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE &amp; 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_645"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_645_1" aria-expanded="false" aria-controls="job_list___sub_collapse_645_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_645_1"><button class="btn btn-outline-success"><span class="job_id">645 : Job ID c2e8b9a76f294a06997275eb723a6ad6</span></button></div></a><div aria-labelledby="job_list___sub_heading_645_1" data-parent="#job_list___sub_accordion_645" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_645_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &amp; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022F2CA7BAD0&gt; encrypted_payload = 'Cd5vRAtkXprjMquYQIFtAkdKpo6b1P+WD+NfSKXKWlJvFdPC9irSjxaV6whnAHTn/ghMybaIImHoqF+wdmChd5Cd1GZjvj8vPd0MfSPKZuU3/gz+EcFea...Q47SWKsETB0qdkhkpviDOnCWT1bmwL9YWUCcTQfwsRumE4kA/ARV/9Np8L9U38w0Y/0xZh+V3/gLZnrCRLzI3pws1pRgvrlv6SCnkLtA42nDhg87ygsw8c' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &amp; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E ValueError: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:445: ValueError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022F2F5A78F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022F2CA7BAD0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-292/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022F2CA7BAD0&gt; encrypted_payload = 'Cd5vRAtkXprjMquYQIFtAkdKpo6b1P+WD+NfSKXKWlJvFdPC9irSjxaV6whnAHTn/ghMybaIImHoqF+wdmChd5Cd1GZjvj8vPd0MfSPKZuU3/gz+EcFea...Q47SWKsETB0qdkhkpviDOnCWT1bmwL9YWUCcTQfwsRumE4kA/ARV/9Np8L9U38w0Y/0xZh+V3/gLZnrCRLzI3pws1pRgvrlv6SCnkLtA42nDhg87ygsw8c' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE &amp; 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: Nonce must be between 8 and 128 bytes robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_646"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_646_1" aria-expanded="false" aria-controls="job_list___sub_collapse_646_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_646_1"><button class="btn btn-outline-success"><span class="job_id">646 : Job ID e4de0b29b8a74e3aae3c78cda633408f</span></button></div></a><div aria-labelledby="job_list___sub_heading_646_1" data-parent="#job_list___sub_accordion_646" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_646_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE &amp; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C735740CB0&gt; encrypted_payload = 'CDGESol+5+Ax6UFCwjllSbePrRYm8fh+brmwBaBQOUpjpu/T8Iy50iDtOUpU8pOP8Pdz5iNJH0WNXFeSP45AzaxiTmHR5wYgWEMYaBvx+jOUIAmewpO/v...oV9Fd/msu2Kw5dXrjPIhhubXfHRGoj2ITbDFEbZUZj3CxpGKq/CxJtCgUy5EzdxApWZPu4boA6DRcvg3bp0PQjr/cGFcSyXrb1UmEIkj+Gb9HUco8j41gv' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &amp; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C737B5B6E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C735740CB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2284/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C735740CB0&gt; encrypted_payload = 'CDGESol+5+Ax6UFCwjllSbePrRYm8fh+brmwBaBQOUpjpu/T8Iy50iDtOUpU8pOP8Pdz5iNJH0WNXFeSP45AzaxiTmHR5wYgWEMYaBvx+jOUIAmewpO/v...oV9Fd/msu2Kw5dXrjPIhhubXfHRGoj2ITbDFEbZUZj3CxpGKq/CxJtCgUy5EzdxApWZPu4boA6DRcvg3bp0PQjr/cGFcSyXrb1UmEIkj+Gb9HUco8j41gv' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE &amp; 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_647"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_647_1" aria-expanded="false" aria-controls="job_list___sub_collapse_647_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_647_1"><button class="btn btn-outline-success"><span class="job_id">647 : Job ID 531eaadc11c14b10b53dc341a0e698e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_647_1" data-parent="#job_list___sub_accordion_647" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_647_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 25), end pos: (274, 26)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt ^ nonce + ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ^: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e1862b7208e850882: unsupported operand type(s) for ^: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C7536D5940&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; payload = {'id': 'cef3456c-bdfb-4362-93b4-65ba7ebf5867', 'salt': 'TbfuwoiD8JdzEem2f2mXpQ==', 'secret': 'unit-test-secret', 'timestamp': 1760722557, ...} key = b'}\xf1mf\ty,:{(A*\xeaE\x0c\xc5\xae\x12\\\r\x1e\xea\x8a\xae\xf6\x05A{(\xfa\xd6\xe2' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ^ nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C7536D7890&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1311/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; payload = {'id': 'b20a9ce3-e540-4ec6-8933-f19f887bed05', 'salt': '4p16dzI3sQZJCBUqxK4L1Q==', 'secret': 'unit-test-secret', 'timestamp': 1760722557, ...} key = b'xh\xbf\x08\xf4\xdf`\xe9\x87\x0c$T\xe6\x84\xeb&amp;\x07\x1eMKsg\xc6p\xb31\xcd1P;\xf2\xe6' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ^ nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C7537016D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp9c6fw623.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; payload = {'id': '3de34c77-1a0b-423b-aaa4-22dfef3973c8', 'salt': 'PgkXsQQ491Ln6D+Bk5YIDw==', 'secret': 'test-secret', 'timestamp': 1760722557, ...} key = b'J\xe8\\.\x13u\x88\x06\xf9%\rjy\xb3\xbaK1\x18\x16\xaaS\xc5X\xba\xa6&gt;\x99\xee\xcbOq\x91' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ^ nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001C7537018B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpg903tnhl.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C75255F710&gt; payload = {'id': 'c7374443-5410-4c6d-95bb-7cd60b4a1da4', 'salt': 'oJgvcIGKHKDQ35YTq2sICw==', 'secret': 'test-secret', 'timestamp': 1760722558, ...} key = b'\xac\xf9\xb6\xc2F3p\xcf\x99\x0b?\x0e\xf8\xf2\x0e\xf9i\xedw\xf6g\xb8\xf6A\x07\xe4\xect\xda\xde\x9f\xea' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt ^ nonce + ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_648"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_648_1" aria-expanded="false" aria-controls="job_list___sub_collapse_648_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_648_1"><button class="btn btn-outline-success"><span class="job_id">648 : Job ID 8b50341c2ff4436987eaf4878e0f07da</span></button></div></a><div aria-labelledby="job_list___sub_heading_648_1" data-parent="#job_list___sub_accordion_648" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_648_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (274, 33), end pos: (274, 34)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -271,7 +271,7 @@ salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext - encrypted = salt + nonce + ciphertext + encrypted = salt + nonce ^ ciphertext return base64.b64encode(encrypted).decode("ascii") def _decrypt_payload(self, key: bytes) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ^: 'bytes' and 'bytes' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ef0dd7d9c6ab34943: unsupported operand type(s) for ^: 'bytes' and 'bytes' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FAF57396A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; payload = {'id': '53b345be-aec9-4c9d-903b-238803154b63', 'salt': 'BUuBN+wkPKfIPS5YphwwTA==', 'secret': 'unit-test-secret', 'timestamp': 1760712899, ...} key = b't\x9cD\x8b\xa1\x199&gt;(2\xb1\xbc\xb8\x8a@u&amp;\xd0\xd6\x87\xe6\xca\xd8\x86\xfc\x8c\xa0z\xb7\xe2_\xc1' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ^ ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FAF573B8C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-876/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; payload = {'id': 'e3bfff27-eecd-403a-b410-47fa979af6b7', 'salt': '8C+8sz2R/vn+0rrRAbckVg==', 'secret': 'unit-test-secret', 'timestamp': 1760712900, ...} key = b'Oq\xe7GM,8\x82\x17\xde\xb6\xb1\xffs\xf4\x92xk\xa1\xc6]b\x17\x9aml\x7f\x8a\x99\x1a\xd8#' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ^ ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001FAF5761730&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmphvqzx5vs.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; payload = {'id': '279f6257-d2df-4c6a-ae0f-a309174133a9', 'salt': 'PCKV1gfENNT1h8HGC4mLdg==', 'secret': 'test-secret', 'timestamp': 1760712900, ...} key = b'\xa8f\x9e\xc0\xd5i\xbc)\x06\xd5\xcch/L\xdf8Q\xc8\xb0\xe2\xb8B\x86\xb2\x0b\x91g\xd9i\xeb\xbe\xef' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ^ ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001FAF5761910&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpgd2rf3ws.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001FAF293F380&gt; payload = {'id': '9ecce6a9-24b2-4183-9aae-f8bd3ef944da', 'salt': 'lKweMva6UexD72hQSHfyXg==', 'secret': 'test-secret', 'timestamp': 1760712900, ...} key = b'\xc7F\xbc\x83t\xb3\xd9n\x03\x1f\xaeAL\x85\xd9\t\\\xdf\x95m\xe6\x90\xba\xb2\xaf\xf6+V\xea&amp;\x85\xba' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) nonce = secrets.token_bytes(12) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None) # Include salt from payload in the encrypted data for easier extraction salt = base64.b64decode(payload["salt"]) # Combine salt, nonce, and ciphertext &gt; encrypted = salt + nonce ^ ciphertext ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes' robust_xmp_watermark.py:274: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_649"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_649_1" aria-expanded="false" aria-controls="job_list___sub_collapse_649_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_649_1"><button class="btn btn-outline-danger"><span class="job_id">649 : Job ID 672f5a57b51f4c00af9b4fc8069621e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_649_1" data-parent="#job_list___sub_accordion_649" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_649_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 67), end pos: (325, 68)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT ^ 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_650"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_650_1" aria-expanded="false" aria-controls="job_list___sub_collapse_650_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_650_1"><button class="btn btn-outline-danger"><span class="job_id">650 : Job ID 25aca74ba61b4e7ab04936bc293afa11</span></button></div></a><div aria-labelledby="job_list___sub_heading_650_1" data-parent="#job_list___sub_accordion_650" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_650_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (330, 28), end pos: (330, 29)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -327,7 +327,7 @@ for i in range(self._FRAGMENT_COUNT): start = i * fragment_size - end = min(start + fragment_size, len(payload_bytes)) + end = min(start ^ fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_651"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_651_1" aria-expanded="false" aria-controls="job_list___sub_collapse_651_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_651_1"><button class="btn btn-outline-danger"><span class="job_id">651 : Job ID 76b53423596d4b65bb2340cd74f1b893</span></button></div></a><div aria-labelledby="job_list___sub_heading_651_1" data-parent="#job_list___sub_accordion_651" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_651_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 54), end pos: (434, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE ^ 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_652"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_652_1" aria-expanded="false" aria-controls="job_list___sub_collapse_652_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_652_1"><button class="btn btn-outline-danger"><span class="job_id">652 : Job ID c95868fc5b1d4738b9571a21c12ad84a</span></button></div></a><div aria-labelledby="job_list___sub_heading_652_1" data-parent="#job_list___sub_accordion_652" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_652_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 73), end pos: (437, 74)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE ^ 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_653"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_653_1" aria-expanded="false" aria-controls="job_list___sub_collapse_653_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_653_1"><button class="btn btn-outline-danger"><span class="job_id">653 : Job ID c03a69bb917d4ccf8ea32759748f6b21</span></button></div></a><div aria-labelledby="job_list___sub_heading_653_1" data-parent="#job_list___sub_accordion_653" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_653_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 60), end pos: (438, 61)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE ^ 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_654"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_654_1" aria-expanded="false" aria-controls="job_list___sub_collapse_654_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_654_1"><button class="btn btn-outline-danger"><span class="job_id">654 : Job ID 1963762459164739b3803b6ecd07f349</span></button></div></a><div aria-labelledby="job_list___sub_heading_654_1" data-parent="#job_list___sub_accordion_654" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_654_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i + fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_655"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_655_1" aria-expanded="false" aria-controls="job_list___sub_collapse_655_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_655_1"><button class="btn btn-outline-danger"><span class="job_id">655 : Job ID 109625a664904cc5a86032d55918dbbb</span></button></div></a><div aria-labelledby="job_list___sub_heading_655_1" data-parent="#job_list___sub_accordion_655" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_655_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i - fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_656"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_656_1" aria-expanded="false" aria-controls="job_list___sub_collapse_656_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_656_1"><button class="btn btn-outline-success"><span class="job_id">656 : Job ID 23487d5efc1a47b0951394eeca360f0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_656_1" data-parent="#job_list___sub_accordion_656" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_656_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i / fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eaf8d1741b07e32b1: slice indices must be integers or None or have an __index__ method ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001870BF658E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; doc = Document('None', &lt;memory, doc# 11&gt;) encrypted_payload = '04XJirV1RF2CLfeP9Ohqy17UnwX7P5AL802VYkyqZw9j1k+N7xgD4/sa90mXFvh6WUASszf4KCo2ICfYysQTwSOcbrSrfK/i9nPxoiDy9PqLrjfAbs8St...apB998K2ETJpcEDOfxuobpRTQXPtsiyWSLOHDZy4him9Omic6uTj+vULxbA65E1fhtvMUbMFREyyiEj9A6GMkQ724ENhJcRsKnR0gg4PJyjhwbMIIQscg7' watermark_id = '24b60359-f06f-4138-8717-ed3cdeb4eb84' key = b'{\xf7U\xee\x8a\xb4\xe0\x1b!\xc9\xfb\xe0\xcbu\xe75(\xd6\xefb\x1a\x9f\x8f\xb4Y\xec\x19\x0f\x03\x08\xec\xec' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i / fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001870BF67950&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1299/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; doc = Document('None', &lt;memory, doc# 17&gt;) encrypted_payload = 'a+ZhkpF4ND4YNB5AY2zbePVIKKKppOraInqbz3z1Unxj5QNuXNAGYnIAXWq2TsoTDsmaKwqKj1BItDrV7t8jpm7pgYCvtIOwcXcXsgtSWon8ved1IhKN/...Stp2EwzG/rNgqa48Pkp//csFmjvA70BPmeAcGPCzkcsZKWfLV3CDcV/WpjqZPBKgQSm/80v/CCe3PXQ6C4K/a/Nk2Tb/TR2f8tF6uhiSZgzKh5jf5uaGAs' watermark_id = 'e21e6c84-2f51-4910-b374-4a352a38c88f' key = b'\x01\x94\xcd\xa7I"y\xf0z\xc4\xbe\xc0l\x83R\x15\xff\xcc\xe6~Y\x08\r\x88\xf8\x13Y,\xfd\xc9[H' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i / fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001870BF8D760&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpbzahemq9.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; doc = Document('None', &lt;memory, doc# 26&gt;) encrypted_payload = 'GvgdxMPrSm4i7u0psrt7URPuvhtPMGNOA4Sae2z/N4zFEv6f2oCyZu8REFUcVZ4cS+MJ4Ozp62HcmGsmiOHgl3zvX6ObLN2a4n9Rw6goyZs1zJDnLgl8T...ljCxBoph8GeZ3h48HoopxLazQLPTORpAmFqEimppf95wlXqpOrCFrXb3VMYS9UrcRPwfety2XCX0k5h+G+PgSW7omGPATB3Udf4lHJypZBCAkgrSdgsw==' watermark_id = '4f3666dc-dccf-4d83-9b47-6cb5ebe9dc61' key = b'q\xef\xd9\x7ftp\xd6\x90\xf8\xbd\xd8Z\x80g\x95\xd7F\xa6\xcf\x84\x07\xfe\xa8\xa0\x01!P\x13v\x9d\xf2\xc6' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i / fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001870BF8D940&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpdk4qn1z3.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018708216150&gt; doc = Document('None', &lt;memory, doc# 28&gt;) encrypted_payload = 'mpJCcaftpAA/zlxBoVm+ByH1N7z+Je/jzeGwM8mOhQwvyv3bkl1KR4IuYEf45r/QLH6/XFnYBb2YUcC3E3Y2qmHNAGPkrWpwlnY/xG0btGAJTAgu+uGMG...pLFEe7s3f2vaDmym5bwhqPhrmqOna3phEaMJeWhSmU2FXQicLE+sd7/ZX0QBK21mclLpVUxOyK5l5xrl/+2CSWQZPhfN8VE0qWuDWn++iyuqhU5LByiA==' watermark_id = '95b224c6-84fe-484c-9de6-659dac900619' key = b'\xef\xb5]7/\x88\x8b\x07\xa3t\xf5\xbb1B4\x84\xce\xe0\xd4&amp;\x02}\x89m6-.g&amp;\x92\xae\xe5' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i / fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_657"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_657_1" aria-expanded="false" aria-controls="job_list___sub_collapse_657_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_657_1"><button class="btn btn-outline-danger"><span class="job_id">657 : Job ID be142021e8864de28fac739c1d9a951f</span></button></div></a><div aria-labelledby="job_list___sub_heading_657_1" data-parent="#job_list___sub_accordion_657" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_657_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i // fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_658"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_658_1" aria-expanded="false" aria-controls="job_list___sub_collapse_658_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_658_1"><button class="btn btn-outline-danger"><span class="job_id">658 : Job ID 0958e64c6ef44923868b760307ea7d77</span></button></div></a><div aria-labelledby="job_list___sub_heading_658_1" data-parent="#job_list___sub_accordion_658" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_658_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i % fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_659"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_659_1" aria-expanded="false" aria-controls="job_list___sub_collapse_659_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_659_1"><button class="btn btn-outline-danger"><span class="job_id">659 : Job ID 4c4761c55106455196f3f2cf02113ae9</span></button></div></a><div aria-labelledby="job_list___sub_heading_659_1" data-parent="#job_list___sub_accordion_659" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_659_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i ** fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_660"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_660_1" aria-expanded="false" aria-controls="job_list___sub_collapse_660_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_660_1"><button class="btn btn-outline-danger"><span class="job_id">660 : Job ID c98b740ad48c449c8b585dbda74095fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_660_1" data-parent="#job_list___sub_accordion_660" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_660_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i &gt;&gt; fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_661"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_661_1" aria-expanded="false" aria-controls="job_list___sub_collapse_661_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_661_1"><button class="btn btn-outline-danger"><span class="job_id">661 : Job ID da679301841644709da75fc025c0d520</span></button></div></a><div aria-labelledby="job_list___sub_heading_661_1" data-parent="#job_list___sub_accordion_661" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_661_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i &lt;&lt; fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_662"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_662_1" aria-expanded="false" aria-controls="job_list___sub_collapse_662_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_662_1"><button class="btn btn-outline-danger"><span class="job_id">662 : Job ID b1e3b19ba844489fa3346ad7b3311583</span></button></div></a><div aria-labelledby="job_list___sub_heading_662_1" data-parent="#job_list___sub_accordion_662" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_662_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i | fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_663"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_663_1" aria-expanded="false" aria-controls="job_list___sub_collapse_663_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_663_1"><button class="btn btn-outline-danger"><span class="job_id">663 : Job ID a2bd5bed0e1c4dad834d1c7622aafea7</span></button></div></a><div aria-labelledby="job_list___sub_heading_663_1" data-parent="#job_list___sub_accordion_663" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_663_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i &amp; fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_664"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_664_1" aria-expanded="false" aria-controls="job_list___sub_collapse_664_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_664_1"><button class="btn btn-outline-danger"><span class="job_id">664 : Job ID 46138ac15e12443ab38cee8735e494d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_664_1" data-parent="#job_list___sub_accordion_664" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_664_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=329" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (329, 22), end pos: (329, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -326,7 +326,7 @@ fragments = [] for i in range(self._FRAGMENT_COUNT): - start = i * fragment_size + start = i ^ fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end] fragments.append(fragment)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_665"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_665_1" aria-expanded="false" aria-controls="job_list___sub_collapse_665_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_665_1"><button class="btn btn-outline-danger"><span class="job_id">665 : Job ID 012a3c929d214b2896d7abf9341a64a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_665_1" data-parent="#job_list___sub_accordion_665" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_665_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) + self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_666"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_666_1" aria-expanded="false" aria-controls="job_list___sub_collapse_666_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_666_1"><button class="btn btn-outline-success"><span class="job_id">666 : Job ID b778e160f63f4f63a0d08098e0f07397</span></button></div></a><div aria-labelledby="job_list___sub_heading_666_1" data-parent="#job_list___sub_accordion_666" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_666_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) - self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110042647748Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110043579404Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_667"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_667_1" aria-expanded="false" aria-controls="job_list___sub_collapse_667_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_667_1"><button class="btn btn-outline-danger"><span class="job_id">667 : Job ID 16df718de91540b6959b1afba207a880</span></button></div></a><div aria-labelledby="job_list___sub_heading_667_1" data-parent="#job_list___sub_accordion_667" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_667_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) * self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_668"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_668_1" aria-expanded="false" aria-controls="job_list___sub_collapse_668_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_668_1"><button class="btn btn-outline-success"><span class="job_id">668 : Job ID 85a76cdc07e848df94cac28e6505e9ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_668_1" data-parent="#job_list___sub_accordion_668" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_668_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) / self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614edd4118f3500ae7cf: slice indices must be integers or None or have an __index__ method ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001A0BB4B9430&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; doc = Document('None', &lt;memory, doc# 11&gt;) encrypted_payload = 'BA6FdRyLusvRHMeR5lmc7VzZpbPgiF7ldwyF7UFlaKdDC4n9acoSNCwh3oytGGjrVGbFlza7z8dFwcLgnnc/FX6mTxJ3xf3fZ2WLiN0QUJWY8KQQHfNKr...kVLvjr4+as8HZAY4ASMMYQac1iAV1HtU7XdWivKoALRN/zYSr4LKAjeG7BZ3iZMRn0WFkdAYDyso+B70rFhQUc5KNVA5RCi4JDHOBU2P5naGe2dEjinn6V' watermark_id = 'e8fdfa9e-855b-4e99-bfb0-b12e5c622b3d' key = b'\xd4\x8d\x97\xac"\xd1\x12D\x14f/\xb4.\xae\xb5\x9bfA\x1d\xc0s\xb7\x92\xf7B\x93\xecf\xf4\x07\xbb\x03' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) / self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001A0BB4BB650&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-993/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; doc = Document('None', &lt;memory, doc# 17&gt;) encrypted_payload = 'ZYNmf9IUBCbSvV8G9c6aC18LK409c3d+6gdBKuW5haQOYI7pydCWa8dA/CcFfMlreH3Sg6PFMqKcQ3V2YX/Cp6F0whnBijzujPgS5glBLOWF/9mMbQKzZ...aSiU4hs3/+I3AeiRD57fTxGQJFetSpDMJYXcS60C9H9z4EORTW6mlbUHNHPr6bjV8btlUzJhX1c3n7Qh22Gqefl89SJprQbUanP9HXQb78fkPYsahxrBvb' watermark_id = '17530d89-8d7b-469d-9f3f-49e57dee950e' key = b'\x95\x8c\xfd\x13n\xa5\x81\x90L\x80$@%\xe9\xd8\x89\xad\xec\xf4%\xf8n|`\xf3\xa2\x07[Z\x1fVC' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) / self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001A0BB4E14C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp2jm2jlja.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; doc = Document('None', &lt;memory, doc# 26&gt;) encrypted_payload = 'J6E7Nxs4FKmdV2k67i37lKfV3X9kVBTJQmpwMGtfg4n5p9tC7Rvqi17odc0lfl2c8yIFD/KybW66oONoKwgvi38enYusgF9qeRYyeuVfkPerLsc2wrxJ1...4clTWTeahPwSs0fAH4ESAMqZmsQHRtQ0dyQ6HaPlVHbQ3Xus7AeI8oMBOA0aToZER4WBSmIOYOKe5LnkmscuQpevZPLLQ3I6NNOEswfqxItbfh5wjr0Q==' watermark_id = 'd0d64ae8-f4e8-4a44-9754-ec3f78939f5e' key = b'O\xb9Z\x93Y\x15(BS\xad\xf0\xb0\xc3\x98\xdbV\\rl\xbbLm\x0b&lt;\xaf\x85\xdbO\x0fh\x95\xd5' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) / self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001A0BB4E16A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpm6mklsvb.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:168: in add_watermark self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001A0B837B260&gt; doc = Document('None', &lt;memory, doc# 28&gt;) encrypted_payload = '5+Zk48x1wE1VCofYjESyAZbe2ST0aasBUnRdCf6DApBCIAF0Lj3bPrPWpIeCqeyuVc52EV7bHu4elmbu9UDI8kcGVMcm7ajHoGt6CIrMa4bKQv6TLvoqp...ya+UGM5jKjcJD2Ev6gpVvZQIKo0hON+AZhNJ/rYcp4tG+dYiUZOsDmLO+dTGqplfx+w1aSFypVU4hIagfgTlf+NLBp1VkkTFwTmHUJatNJ5E8Epz0hkg==' watermark_id = 'a53029fd-2193-4eb1-b105-b8130f36a86f' key = b'\xce\x81\xa7\xb3\x1c\xd0\x10\x0c\xa0#s\xd3N3\xf2u\xadw\xa4ac\xca\x0b\x07\xb7y\xe5\x89\x1e\x00\x1c\xe0' def _embed_fragments( self, doc: fitz.Document, encrypted_payload: str, watermark_id: str, key: bytes, ) -&gt; None: """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") fragment_size = len(payload_bytes) / self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT): start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) &gt; fragment = payload_bytes[start:end] ^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: slice indices must be integers or None or have an __index__ method robust_xmp_watermark.py:331: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_669"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_669_1" aria-expanded="false" aria-controls="job_list___sub_collapse_669_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_669_1"><button class="btn btn-outline-danger"><span class="job_id">669 : Job ID dbd3b99f8c53480da21a05399b801097</span></button></div></a><div aria-labelledby="job_list___sub_heading_669_1" data-parent="#job_list___sub_accordion_669" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_669_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) % self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_670"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_670_1" aria-expanded="false" aria-controls="job_list___sub_collapse_670_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_670_1"><button class="btn btn-outline-danger"><span class="job_id">670 : Job ID 7406b2e22c1a40968ce491d76af50da8</span></button></div></a><div aria-labelledby="job_list___sub_heading_670_1" data-parent="#job_list___sub_accordion_670" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_670_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) ** self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_671"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_671_1" aria-expanded="false" aria-controls="job_list___sub_collapse_671_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_671_1"><button class="btn btn-outline-danger"><span class="job_id">671 : Job ID 866d3c2b7b18485db2a46bb84142c230</span></button></div></a><div aria-labelledby="job_list___sub_heading_671_1" data-parent="#job_list___sub_accordion_671" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_671_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) &gt;&gt; self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_672"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_672_1" aria-expanded="false" aria-controls="job_list___sub_collapse_672_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_672_1"><button class="btn btn-outline-danger"><span class="job_id">672 : Job ID feb5eb28c3124522bea4400b8c8195c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_672_1" data-parent="#job_list___sub_accordion_672" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_672_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) &lt;&lt; self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_673"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_673_1" aria-expanded="false" aria-controls="job_list___sub_collapse_673_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_673_1"><button class="btn btn-outline-danger"><span class="job_id">673 : Job ID f50cdf021f8643cd9d9331d0639f24d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_673_1" data-parent="#job_list___sub_accordion_673" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_673_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) | self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 23.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_674"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_674_1" aria-expanded="false" aria-controls="job_list___sub_collapse_674_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_674_1"><button class="btn btn-outline-danger"><span class="job_id">674 : Job ID e766107bad9a47d789bfcd0afad76ead</span></button></div></a><div aria-labelledby="job_list___sub_heading_674_1" data-parent="#job_list___sub_accordion_674" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_674_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) &amp; self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_675"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_675_1" aria-expanded="false" aria-controls="job_list___sub_collapse_675_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_675_1"><button class="btn btn-outline-danger"><span class="job_id">675 : Job ID 4ac432369ce14d3aacb2b20cd3594b64</span></button></div></a><div aria-labelledby="job_list___sub_heading_675_1" data-parent="#job_list___sub_accordion_675" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_675_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 43), end pos: (325, 45)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_FloorDiv_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) ^ self._FRAGMENT_COUNT + 1 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_676"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_676_1" aria-expanded="false" aria-controls="job_list___sub_collapse_676_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_676_1"><button class="btn btn-outline-danger"><span class="job_id">676 : Job ID 7ec58b62545b47fd9e9deebcf61e46a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_676_1" data-parent="#job_list___sub_accordion_676" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_676_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str + None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_677"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_677_1" aria-expanded="false" aria-controls="job_list___sub_collapse_677_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_677_1"><button class="btn btn-outline-danger"><span class="job_id">677 : Job ID c843eb517c4549fbae06c6db88a03192</span></button></div></a><div aria-labelledby="job_list___sub_heading_677_1" data-parent="#job_list___sub_accordion_677" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_677_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str + None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_678"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_678_1" aria-expanded="false" aria-controls="job_list___sub_collapse_678_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_678_1"><button class="btn btn-outline-danger"><span class="job_id">678 : Job ID 20ae37f34c4b4c30b513248f3e1473aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_678_1" data-parent="#job_list___sub_accordion_678" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_678_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str + None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_679"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_679_1" aria-expanded="false" aria-controls="job_list___sub_collapse_679_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_679_1"><button class="btn btn-outline-danger"><span class="job_id">679 : Job ID 2278faba17bd4da4907468f97ab312e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_679_1" data-parent="#job_list___sub_accordion_679" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_679_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str + None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_680"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_680_1" aria-expanded="false" aria-controls="job_list___sub_collapse_680_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_680_1"><button class="btn btn-outline-success"><span class="job_id">680 : Job ID 086fcdc19bd14631a948f12d85c47690</span></button></div></a><div aria-labelledby="job_list___sub_heading_680_1" data-parent="#job_list___sub_accordion_680" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_680_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str + None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T202109150463Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T202110006113Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_681"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_681_1" aria-expanded="false" aria-controls="job_list___sub_collapse_681_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_681_1"><button class="btn btn-outline-success"><span class="job_id">681 : Job ID 874307b4523f4190859be35ff2c6357a</span></button></div></a><div aria-labelledby="job_list___sub_heading_681_1" data-parent="#job_list___sub_accordion_681" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_681_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str + None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182158988621Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182159844319Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_682"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_682_1" aria-expanded="false" aria-controls="job_list___sub_collapse_682_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_682_1"><button class="btn btn-outline-danger"><span class="job_id">682 : Job ID 83f0488c6ae341009f4a5998da0889e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_682_1" data-parent="#job_list___sub_accordion_682" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_682_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str - None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_683"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_683_1" aria-expanded="false" aria-controls="job_list___sub_collapse_683_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_683_1"><button class="btn btn-outline-danger"><span class="job_id">683 : Job ID 146ca6c0e132480198275bfc196684f8</span></button></div></a><div aria-labelledby="job_list___sub_heading_683_1" data-parent="#job_list___sub_accordion_683" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_683_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str - None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_684"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_684_1" aria-expanded="false" aria-controls="job_list___sub_collapse_684_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_684_1"><button class="btn btn-outline-danger"><span class="job_id">684 : Job ID e9a8714fd07340058d9bfc2ec5483ac4</span></button></div></a><div aria-labelledby="job_list___sub_heading_684_1" data-parent="#job_list___sub_accordion_684" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_684_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str - None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_685"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_685_1" aria-expanded="false" aria-controls="job_list___sub_collapse_685_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_685_1"><button class="btn btn-outline-danger"><span class="job_id">685 : Job ID 72b9f668f8624619b19ab880634173b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_685_1" data-parent="#job_list___sub_accordion_685" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_685_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str - None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_686"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_686_1" aria-expanded="false" aria-controls="job_list___sub_collapse_686_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_686_1"><button class="btn btn-outline-danger"><span class="job_id">686 : Job ID 4eb8115e833548b3a3368d00845a8fe5</span></button></div></a><div aria-labelledby="job_list___sub_heading_686_1" data-parent="#job_list___sub_accordion_686" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_686_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str - None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_687"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_687_1" aria-expanded="false" aria-controls="job_list___sub_collapse_687_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_687_1"><button class="btn btn-outline-danger"><span class="job_id">687 : Job ID f0dc4f31a71c485782a7b99d963e5984</span></button></div></a><div aria-labelledby="job_list___sub_heading_687_1" data-parent="#job_list___sub_accordion_687" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_687_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str - None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_688"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_688_1" aria-expanded="false" aria-controls="job_list___sub_collapse_688_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_688_1"><button class="btn btn-outline-danger"><span class="job_id">688 : Job ID e94a0b1f46294c82a0bdbcaf01f8d73f</span></button></div></a><div aria-labelledby="job_list___sub_heading_688_1" data-parent="#job_list___sub_accordion_688" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_688_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str * None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_689"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_689_1" aria-expanded="false" aria-controls="job_list___sub_collapse_689_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_689_1"><button class="btn btn-outline-danger"><span class="job_id">689 : Job ID c2a39e34b58243d6ae9c27626a55092f</span></button></div></a><div aria-labelledby="job_list___sub_heading_689_1" data-parent="#job_list___sub_accordion_689" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_689_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str * None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_690"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_690_1" aria-expanded="false" aria-controls="job_list___sub_collapse_690_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_690_1"><button class="btn btn-outline-danger"><span class="job_id">690 : Job ID aaac0a37e4434a2fab7b62ff36346aec</span></button></div></a><div aria-labelledby="job_list___sub_heading_690_1" data-parent="#job_list___sub_accordion_690" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_690_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str * None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_691"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_691_1" aria-expanded="false" aria-controls="job_list___sub_collapse_691_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_691_1"><button class="btn btn-outline-danger"><span class="job_id">691 : Job ID 21a019f1b2be4bceb4d70e90ab2c92ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_691_1" data-parent="#job_list___sub_accordion_691" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_691_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str * None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_692"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_692_1" aria-expanded="false" aria-controls="job_list___sub_collapse_692_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_692_1"><button class="btn btn-outline-danger"><span class="job_id">692 : Job ID 6dbee26cb6144166b9b582635c28fe48</span></button></div></a><div aria-labelledby="job_list___sub_heading_692_1" data-parent="#job_list___sub_accordion_692" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_692_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str * None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_693"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_693_1" aria-expanded="false" aria-controls="job_list___sub_collapse_693_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_693_1"><button class="btn btn-outline-danger"><span class="job_id">693 : Job ID 1174c21711704ebdb1ce526b73204cb8</span></button></div></a><div aria-labelledby="job_list___sub_heading_693_1" data-parent="#job_list___sub_accordion_693" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_693_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str * None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_694"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_694_1" aria-expanded="false" aria-controls="job_list___sub_collapse_694_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_694_1"><button class="btn btn-outline-success"><span class="job_id">694 : Job ID 0ca916ffe3cc4fadbc56a5181cd093ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_694_1" data-parent="#job_list___sub_accordion_694" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_694_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str / None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004107605569Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004108457986Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_695"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_695_1" aria-expanded="false" aria-controls="job_list___sub_collapse_695_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_695_1"><button class="btn btn-outline-danger"><span class="job_id">695 : Job ID afc260b0cf6449e09bebd833e0e95d62</span></button></div></a><div aria-labelledby="job_list___sub_heading_695_1" data-parent="#job_list___sub_accordion_695" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_695_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str / None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_696"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_696_1" aria-expanded="false" aria-controls="job_list___sub_collapse_696_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_696_1"><button class="btn btn-outline-danger"><span class="job_id">696 : Job ID 9c04aac40e3d4a0f8837edd0bcf6040a</span></button></div></a><div aria-labelledby="job_list___sub_heading_696_1" data-parent="#job_list___sub_accordion_696" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_696_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str / None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_697"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_697_1" aria-expanded="false" aria-controls="job_list___sub_collapse_697_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_697_1"><button class="btn btn-outline-danger"><span class="job_id">697 : Job ID 67460afe16a2408ea93f5d35f05bac3d</span></button></div></a><div aria-labelledby="job_list___sub_heading_697_1" data-parent="#job_list___sub_accordion_697" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_697_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str / None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_698"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_698_1" aria-expanded="false" aria-controls="job_list___sub_collapse_698_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_698_1"><button class="btn btn-outline-danger"><span class="job_id">698 : Job ID 0643304de914400e9d78e67e9e8a6209</span></button></div></a><div aria-labelledby="job_list___sub_heading_698_1" data-parent="#job_list___sub_accordion_698" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_698_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str / None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_699"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_699_1" aria-expanded="false" aria-controls="job_list___sub_collapse_699_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_699_1"><button class="btn btn-outline-danger"><span class="job_id">699 : Job ID 80c5557b9f554784bbf0f29115a1d451</span></button></div></a><div aria-labelledby="job_list___sub_heading_699_1" data-parent="#job_list___sub_accordion_699" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_699_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str / None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_700"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_700_1" aria-expanded="false" aria-controls="job_list___sub_collapse_700_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_700_1"><button class="btn btn-outline-danger"><span class="job_id">700 : Job ID b1743a8321d3406dad1c354c49cbf5fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_700_1" data-parent="#job_list___sub_accordion_700" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_700_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str // None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_701"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_701_1" aria-expanded="false" aria-controls="job_list___sub_collapse_701_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_701_1"><button class="btn btn-outline-danger"><span class="job_id">701 : Job ID 5458f2b1cc164eccb94b4dae1403d1bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_701_1" data-parent="#job_list___sub_accordion_701" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_701_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str // None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_702"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_702_1" aria-expanded="false" aria-controls="job_list___sub_collapse_702_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_702_1"><button class="btn btn-outline-danger"><span class="job_id">702 : Job ID f94b3819cf0a4ae086d849c51948afda</span></button></div></a><div aria-labelledby="job_list___sub_heading_702_1" data-parent="#job_list___sub_accordion_702" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_702_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str // None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_703"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_703_1" aria-expanded="false" aria-controls="job_list___sub_collapse_703_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_703_1"><button class="btn btn-outline-success"><span class="job_id">703 : Job ID 507250d9ceb64498accae541a99b0371</span></button></div></a><div aria-labelledby="job_list___sub_heading_703_1" data-parent="#job_list___sub_accordion_703" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_703_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str // None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102549844999Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102550736796Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_704"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_704_1" aria-expanded="false" aria-controls="job_list___sub_collapse_704_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_704_1"><button class="btn btn-outline-danger"><span class="job_id">704 : Job ID 4fade7c12ed14441830f97d5c2294152</span></button></div></a><div aria-labelledby="job_list___sub_heading_704_1" data-parent="#job_list___sub_accordion_704" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_704_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str // None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_705"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_705_1" aria-expanded="false" aria-controls="job_list___sub_collapse_705_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_705_1"><button class="btn btn-outline-danger"><span class="job_id">705 : Job ID 6a1bd5211dce40f8aab59277ac99b405</span></button></div></a><div aria-labelledby="job_list___sub_heading_705_1" data-parent="#job_list___sub_accordion_705" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_705_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str // None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_706"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_706_1" aria-expanded="false" aria-controls="job_list___sub_collapse_706_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_706_1"><button class="btn btn-outline-danger"><span class="job_id">706 : Job ID 974dee6ece0847869407e881552279c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_706_1" data-parent="#job_list___sub_accordion_706" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_706_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str % None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_707"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_707_1" aria-expanded="false" aria-controls="job_list___sub_collapse_707_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_707_1"><button class="btn btn-outline-danger"><span class="job_id">707 : Job ID 775986dbe4154243a91101aedbc7ef96</span></button></div></a><div aria-labelledby="job_list___sub_heading_707_1" data-parent="#job_list___sub_accordion_707" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_707_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str % None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_708"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_708_1" aria-expanded="false" aria-controls="job_list___sub_collapse_708_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_708_1"><button class="btn btn-outline-danger"><span class="job_id">708 : Job ID a97c34e1ab3a4441887206b0258fad4f</span></button></div></a><div aria-labelledby="job_list___sub_heading_708_1" data-parent="#job_list___sub_accordion_708" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_708_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str % None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_709"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_709_1" aria-expanded="false" aria-controls="job_list___sub_collapse_709_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_709_1"><button class="btn btn-outline-danger"><span class="job_id">709 : Job ID 8443758f4f3c4c0f877a51966e8acec5</span></button></div></a><div aria-labelledby="job_list___sub_heading_709_1" data-parent="#job_list___sub_accordion_709" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_709_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str % None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_710"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_710_1" aria-expanded="false" aria-controls="job_list___sub_collapse_710_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_710_1"><button class="btn btn-outline-danger"><span class="job_id">710 : Job ID ad53b9728eb24d25a01a1409ebd86c9f</span></button></div></a><div aria-labelledby="job_list___sub_heading_710_1" data-parent="#job_list___sub_accordion_710" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_710_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str % None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_711"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_711_1" aria-expanded="false" aria-controls="job_list___sub_collapse_711_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_711_1"><button class="btn btn-outline-danger"><span class="job_id">711 : Job ID 4377892b567746d29fb05dcb593b51a7</span></button></div></a><div aria-labelledby="job_list___sub_heading_711_1" data-parent="#job_list___sub_accordion_711" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_711_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str % None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_712"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_712_1" aria-expanded="false" aria-controls="job_list___sub_collapse_712_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_712_1"><button class="btn btn-outline-danger"><span class="job_id">712 : Job ID 4ffc76eb1e1a4e7a9404ce16bd6830eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_712_1" data-parent="#job_list___sub_accordion_712" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_712_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ** None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_713"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_713_1" aria-expanded="false" aria-controls="job_list___sub_collapse_713_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_713_1"><button class="btn btn-outline-danger"><span class="job_id">713 : Job ID 8fab9afdb5a142e6963761a42b8ce3b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_713_1" data-parent="#job_list___sub_accordion_713" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_713_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ** None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_714"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_714_1" aria-expanded="false" aria-controls="job_list___sub_collapse_714_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_714_1"><button class="btn btn-outline-danger"><span class="job_id">714 : Job ID 6c15cf73256d4fc1841c09e9041eb1ad</span></button></div></a><div aria-labelledby="job_list___sub_heading_714_1" data-parent="#job_list___sub_accordion_714" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_714_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ** None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_715"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_715_1" aria-expanded="false" aria-controls="job_list___sub_collapse_715_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_715_1"><button class="btn btn-outline-danger"><span class="job_id">715 : Job ID 3e05151c84ca4dda96c1831164b4e154</span></button></div></a><div aria-labelledby="job_list___sub_heading_715_1" data-parent="#job_list___sub_accordion_715" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_715_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str ** None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_716"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_716_1" aria-expanded="false" aria-controls="job_list___sub_collapse_716_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_716_1"><button class="btn btn-outline-danger"><span class="job_id">716 : Job ID e5938ce19cf24b55a25bda6e06269017</span></button></div></a><div aria-labelledby="job_list___sub_heading_716_1" data-parent="#job_list___sub_accordion_716" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_716_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str ** None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_717"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_717_1" aria-expanded="false" aria-controls="job_list___sub_collapse_717_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_717_1"><button class="btn btn-outline-danger"><span class="job_id">717 : Job ID f1d459a7fb2743a1a9b99f540149d8b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_717_1" data-parent="#job_list___sub_accordion_717" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_717_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str ** None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_718"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_718_1" aria-expanded="false" aria-controls="job_list___sub_collapse_718_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_718_1"><button class="btn btn-outline-success"><span class="job_id">718 : Job ID 348bdeebdedc49b9bd802679d0557f95</span></button></div></a><div aria-labelledby="job_list___sub_heading_718_1" data-parent="#job_list___sub_accordion_718" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_718_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &gt;&gt; None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132946637469Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132947535219Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_719"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_719_1" aria-expanded="false" aria-controls="job_list___sub_collapse_719_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_719_1"><button class="btn btn-outline-danger"><span class="job_id">719 : Job ID 5e872b14eff64e5e98f1c170dcf3be4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_719_1" data-parent="#job_list___sub_accordion_719" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_719_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_720"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_720_1" aria-expanded="false" aria-controls="job_list___sub_collapse_720_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_720_1"><button class="btn btn-outline-danger"><span class="job_id">720 : Job ID 55c6d639ed0740aeb94ad9028d42a72b</span></button></div></a><div aria-labelledby="job_list___sub_heading_720_1" data-parent="#job_list___sub_accordion_720" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_720_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_721"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_721_1" aria-expanded="false" aria-controls="job_list___sub_collapse_721_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_721_1"><button class="btn btn-outline-danger"><span class="job_id">721 : Job ID aa88b38bf1cb40fc8b978d67f1dfb7dd</span></button></div></a><div aria-labelledby="job_list___sub_heading_721_1" data-parent="#job_list___sub_accordion_721" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_721_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str &gt;&gt; None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_722"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_722_1" aria-expanded="false" aria-controls="job_list___sub_collapse_722_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_722_1"><button class="btn btn-outline-danger"><span class="job_id">722 : Job ID abaf5c0afbaf4f0e863f2499db3ed86b</span></button></div></a><div aria-labelledby="job_list___sub_heading_722_1" data-parent="#job_list___sub_accordion_722" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_722_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str &gt;&gt; None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_723"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_723_1" aria-expanded="false" aria-controls="job_list___sub_collapse_723_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_723_1"><button class="btn btn-outline-danger"><span class="job_id">723 : Job ID 88ee3bdaf7a34d03babdc3240470fb90</span></button></div></a><div aria-labelledby="job_list___sub_heading_723_1" data-parent="#job_list___sub_accordion_723" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_723_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str &gt;&gt; None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_724"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_724_1" aria-expanded="false" aria-controls="job_list___sub_collapse_724_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_724_1"><button class="btn btn-outline-danger"><span class="job_id">724 : Job ID 078ed2eec56940a9b21a7f93ad15e47b</span></button></div></a><div aria-labelledby="job_list___sub_heading_724_1" data-parent="#job_list___sub_accordion_724" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_724_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &lt;&lt; None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_725"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_725_1" aria-expanded="false" aria-controls="job_list___sub_collapse_725_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_725_1"><button class="btn btn-outline-danger"><span class="job_id">725 : Job ID f91bfef395d94c27916727942dc114fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_725_1" data-parent="#job_list___sub_accordion_725" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_725_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_726"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_726_1" aria-expanded="false" aria-controls="job_list___sub_collapse_726_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_726_1"><button class="btn btn-outline-danger"><span class="job_id">726 : Job ID d03c77cb236143ea8dc57af8503f9f47</span></button></div></a><div aria-labelledby="job_list___sub_heading_726_1" data-parent="#job_list___sub_accordion_726" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_726_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_727"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_727_1" aria-expanded="false" aria-controls="job_list___sub_collapse_727_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_727_1"><button class="btn btn-outline-danger"><span class="job_id">727 : Job ID 26c18ff2abd540c8a64b5096874b9114</span></button></div></a><div aria-labelledby="job_list___sub_heading_727_1" data-parent="#job_list___sub_accordion_727" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_727_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str &lt;&lt; None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_728"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_728_1" aria-expanded="false" aria-controls="job_list___sub_collapse_728_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_728_1"><button class="btn btn-outline-danger"><span class="job_id">728 : Job ID f098346e67414101a0bf336cc432bf66</span></button></div></a><div aria-labelledby="job_list___sub_heading_728_1" data-parent="#job_list___sub_accordion_728" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_728_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str &lt;&lt; None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_729"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_729_1" aria-expanded="false" aria-controls="job_list___sub_collapse_729_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_729_1"><button class="btn btn-outline-success"><span class="job_id">729 : Job ID aa72d9a735364fe8aa4b38b030929589</span></button></div></a><div aria-labelledby="job_list___sub_heading_729_1" data-parent="#job_list___sub_accordion_729" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_729_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str &lt;&lt; None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T141234076293Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T141234980637Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_730"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_730_1" aria-expanded="false" aria-controls="job_list___sub_collapse_730_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_730_1"><button class="btn btn-outline-danger"><span class="job_id">730 : Job ID 4123b45154de42f3b84fcde5f5121cd1</span></button></div></a><div aria-labelledby="job_list___sub_heading_730_1" data-parent="#job_list___sub_accordion_730" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_730_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &amp; None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_731"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_731_1" aria-expanded="false" aria-controls="job_list___sub_collapse_731_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_731_1"><button class="btn btn-outline-danger"><span class="job_id">731 : Job ID 71ce167ba24a465c804b974f4841c9a3</span></button></div></a><div aria-labelledby="job_list___sub_heading_731_1" data-parent="#job_list___sub_accordion_731" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_731_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_732"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_732_1" aria-expanded="false" aria-controls="job_list___sub_collapse_732_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_732_1"><button class="btn btn-outline-danger"><span class="job_id">732 : Job ID da80e6af062b4297b85d981d1098fd38</span></button></div></a><div aria-labelledby="job_list___sub_heading_732_1" data-parent="#job_list___sub_accordion_732" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_732_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_733"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_733_1" aria-expanded="false" aria-controls="job_list___sub_collapse_733_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_733_1"><button class="btn btn-outline-danger"><span class="job_id">733 : Job ID ce05f068d10347979d736763a4cb6e76</span></button></div></a><div aria-labelledby="job_list___sub_heading_733_1" data-parent="#job_list___sub_accordion_733" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_733_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str &amp; None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_734"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_734_1" aria-expanded="false" aria-controls="job_list___sub_collapse_734_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_734_1"><button class="btn btn-outline-danger"><span class="job_id">734 : Job ID 8d37dc3302a94bbfafb3825589851ed7</span></button></div></a><div aria-labelledby="job_list___sub_heading_734_1" data-parent="#job_list___sub_accordion_734" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_734_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str &amp; None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_735"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_735_1" aria-expanded="false" aria-controls="job_list___sub_collapse_735_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_735_1"><button class="btn btn-outline-danger"><span class="job_id">735 : Job ID c702078a6b7a41ea82124f208b05ac6e</span></button></div></a><div aria-labelledby="job_list___sub_heading_735_1" data-parent="#job_list___sub_accordion_735" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_735_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str &amp; None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_736"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_736_1" aria-expanded="false" aria-controls="job_list___sub_collapse_736_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_736_1"><button class="btn btn-outline-danger"><span class="job_id">736 : Job ID 39750b88b5c34789bfbbbc9b0156a1d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_736_1" data-parent="#job_list___sub_accordion_736" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_736_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (100, 26), end pos: (100, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -97,7 +97,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ^ None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_737"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_737_1" aria-expanded="false" aria-controls="job_list___sub_collapse_737_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_737_1"><button class="btn btn-outline-danger"><span class="job_id">737 : Job ID 07ac61cf9f884ceebf63f5b24e957d9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_737_1" data-parent="#job_list___sub_accordion_737" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_737_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (101, 22), end pos: (101, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -98,7 +98,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ^ None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_738"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_738_1" aria-expanded="false" aria-controls="job_list___sub_collapse_738_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_738_1"><button class="btn btn-outline-danger"><span class="job_id">738 : Job ID 45340777ad3a4d669698128e72169255</span></button></div></a><div aria-labelledby="job_list___sub_heading_738_1" data-parent="#job_list___sub_accordion_738" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_738_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (194, 22), end pos: (194, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -191,7 +191,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ^ None = None, ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_739"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_739_1" aria-expanded="false" aria-controls="job_list___sub_collapse_739_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_739_1"><button class="btn btn-outline-danger"><span class="job_id">739 : Job ID 875b67bc038b49cf95153a2eb1f50065</span></button></div></a><div aria-labelledby="job_list___sub_heading_739_1" data-parent="#job_list___sub_accordion_739" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_739_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (350, 59), end pos: (350, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -347,7 +347,7 @@ # If we can't add annotations, skip fragments continue - def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_xmp(self, doc: fitz.Document) -&gt; str ^ None: """Extract watermark from XMP metadata (document info implementation).""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_740"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_740_1" aria-expanded="false" aria-controls="job_list___sub_collapse_740_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_740_1"><button class="btn btn-outline-success"><span class="job_id">740 : Job ID 1ab3d58a0f284995858d7bf155dfcaae</span></button></div></a><div aria-labelledby="job_list___sub_heading_740_1" data-parent="#job_list___sub_accordion_740" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_740_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=375" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (375, 69), end pos: (375, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -372,7 +372,7 @@ pass return None - def _extract_from_document_info(self, doc: fitz.Document) -&gt; str | None: + def _extract_from_document_info(self, doc: fitz.Document) -&gt; str ^ None: """Extract watermark from document info dictionary.""" try: metadata = doc.metadata</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144433198143Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144434093415Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_741"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_741_1" aria-expanded="false" aria-controls="job_list___sub_collapse_741_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_741_1"><button class="btn btn-outline-danger"><span class="job_id">741 : Job ID ee2712b610d444c28cbcd02da56b2d3e</span></button></div></a><div aria-labelledby="job_list___sub_heading_741_1" data-parent="#job_list___sub_accordion_741" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_741_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=390" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (390, 69), end pos: (390, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -387,7 +387,7 @@ pass return None - def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str | None: + def _reconstruct_from_fragments(self, doc: fitz.Document) -&gt; str ^ None: """Reconstruct watermark from distributed fragments.""" try: fragments = {}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_742"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_742_1" aria-expanded="false" aria-controls="job_list___sub_collapse_742_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_742_1"><button class="btn btn-outline-danger"><span class="job_id">742 : Job ID d2e18a27bdf14a95925e08939299a279</span></button></div></a><div aria-labelledby="job_list___sub_heading_742_1" data-parent="#job_list___sub_accordion_742" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_742_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 30), end pos: (148, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count != 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_743"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_743_1" aria-expanded="false" aria-controls="job_list___sub_collapse_743_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_743_1"><button class="btn btn-outline-success"><span class="job_id">743 : Job ID 883b0158027c47cd832c363e020d6a2c</span></button></div></a><div aria-labelledby="job_list___sub_heading_743_1" data-parent="#job_list___sub_accordion_743" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_743_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") != self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C5061EB830&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C5035E18B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1186/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001C5035E18B0&gt; encrypted_payload = '81V7hZGyB07L3Zv9U/r082fHgqorBWHHoVv7raUJD00GU+9fnw+A5vfz0GRQrzS0A3G0+Go+1r4bfYa10hHWQHUNIaNdGZl3dAcs8r5e0jWFp6uIEySDC...2KYle6Vs6mKYAjSjAEibSMhG/lHOWfDjpxZojO+DB7heVOOkuIaP+N4APV2CunYX6GZWDK0Nw3gAFAD4wikObBXGbM4FmpXeCQiVLgeYWOBClXBTu6XFOt' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") != self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_744"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_744_1" aria-expanded="false" aria-controls="job_list___sub_collapse_744_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_744_1"><button class="btn btn-outline-danger"><span class="job_id">744 : Job ID 446d73ad12444dd384a405dbfdf94cc8</span></button></div></a><div aria-labelledby="job_list___sub_heading_744_1" data-parent="#job_list___sub_accordion_744" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_744_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 30), end pos: (148, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count &lt; 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_745"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_745_1" aria-expanded="false" aria-controls="job_list___sub_collapse_745_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_745_1"><button class="btn btn-outline-success"><span class="job_id">745 : Job ID 1399931dee4e4733b223368158baa522</span></button></div></a><div aria-labelledby="job_list___sub_heading_745_1" data-parent="#job_list___sub_accordion_745" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_745_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") &lt; self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.........F.................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T224321999540Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T224322824895Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000166EC3479B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000166EB1D9550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2151/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000166EB1D9550&gt; encrypted_payload = 'ZEEV7gs+B6t69HhKb6jnhF2TsXtQ/e2uvgyWs8DYKpMmpyrxXs4l84aWNSmzjm2AQ+NjAhpMkuGHGNwGSDsYSnXIjawCe9pxruNRKTO0iXQB3JHRySfHB...1ChHEMQO+8HYcA+6Lr+aY4wgoxkycpdW7Cg4788sgPEBaVqrqfnvIQ8sAdVCuHJiMvYjKOkl7g85DmRXndJMufySPS7V2YI0a6G2LlwAq0UAFu7rrtRSA6' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") &lt; self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 9 failed, 33 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_746"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_746_1" aria-expanded="false" aria-controls="job_list___sub_collapse_746_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_746_1"><button class="btn btn-outline-danger"><span class="job_id">746 : Job ID 776448cb33cd4a02b3cdc630db549965</span></button></div></a><div aria-labelledby="job_list___sub_heading_746_1" data-parent="#job_list___sub_accordion_746" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_746_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 30), end pos: (148, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count &lt;= 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_747"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_747_1" aria-expanded="false" aria-controls="job_list___sub_collapse_747_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_747_1"><button class="btn btn-outline-danger"><span class="job_id">747 : Job ID c54e549d1e3243398a46ef74cca8c01d</span></button></div></a><div aria-labelledby="job_list___sub_heading_747_1" data-parent="#job_list___sub_accordion_747" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_747_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") &lt;= self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_748"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_748_1" aria-expanded="false" aria-controls="job_list___sub_collapse_748_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_748_1"><button class="btn btn-outline-danger"><span class="job_id">748 : Job ID 545d76e7c0764308b29d658d9de345f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_748_1" data-parent="#job_list___sub_accordion_748" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_748_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 30), end pos: (148, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count &gt; 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_749"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_749_1" aria-expanded="false" aria-controls="job_list___sub_collapse_749_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_749_1"><button class="btn btn-outline-success"><span class="job_id">749 : Job ID 48045048042d416cb153cfee05f90400</span></button></div></a><div aria-labelledby="job_list___sub_heading_749_1" data-parent="#job_list___sub_accordion_749" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_749_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") &gt; self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000018BF6D479E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018BF41959A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-940/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018BF41959A0&gt; encrypted_payload = 'wH0CnDFZbA4bacHY9tWZqMVnJoq9tQta+flNpHEbw0OVmDvUNYgwSRCvmE6LZ2UqszuawG35ktpfbH9dLyH9KlvUG3KjRl9AclJv2SUp1wu/28DVCblf8...KYWOaJ+SXLcEpIibNzSRiNpDP9Mg8Np+0282H8nOxj0Zlu9HvZEHS8HQC4dH+Xb6q/ktdkhcKr83S7Vr2GqW3RiBYx5kP9Ay/f1jUKmmwP2zzR/aXhcQ7Q' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") &gt; self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 23.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_750"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_750_1" aria-expanded="false" aria-controls="job_list___sub_collapse_750_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_750_1"><button class="btn btn-outline-danger"><span class="job_id">750 : Job ID c8ab571f7e6a46269d88bdf24f649abe</span></button></div></a><div aria-labelledby="job_list___sub_heading_750_1" data-parent="#job_list___sub_accordion_750" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_750_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 30), end pos: (148, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count &gt;= 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_751"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_751_1" aria-expanded="false" aria-controls="job_list___sub_collapse_751_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_751_1"><button class="btn btn-outline-danger"><span class="job_id">751 : Job ID c9f96c56542e4c568b1697119cd965c8</span></button></div></a><div aria-labelledby="job_list___sub_heading_751_1" data-parent="#job_list___sub_accordion_751" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_751_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") &gt;= self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_752"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_752_1" aria-expanded="false" aria-controls="job_list___sub_collapse_752_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_752_1"><button class="btn btn-outline-danger"><span class="job_id">752 : Job ID c714cd9efb6d46a7974b15145e7fa8f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_752_1" data-parent="#job_list___sub_accordion_752" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_752_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") is self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_753"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_753_1" aria-expanded="false" aria-controls="job_list___sub_collapse_753_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_753_1"><button class="btn btn-outline-success"><span class="job_id">753 : Job ID 3a0c8af753f54e81b1d701e8b3a4efef</span></button></div></a><div aria-labelledby="job_list___sub_heading_753_1" data-parent="#job_list___sub_accordion_753" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_753_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 47), end pos: (451, 49)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + and payload.get("version") is not self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B124A9F230&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B1226B8F80&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-481/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B1226B8F80&gt; encrypted_payload = 'u+PJEy8WQjJue1MzKhgvIwtCWM1wRNqfcsyajNIjZZn+c1aawYFEtkwAxY70redznFwBipbqaoyVG3osoeaa0Nh6BgbiQfOjmZVOP0BJ0eZskj+8Hu9S5...Zb/0ZaMDbl1Lk3S6NTS5AiV5OR8c24U09/Y6GUR1uOwqHUWu7W14A0eOASTI57i213rsHlT7NqsQvxSarFpOfgFoUP36kjYUAR6iBS1xD8gWtqo7QVhYnd' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") is not self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_754"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_754_1" aria-expanded="false" aria-controls="job_list___sub_collapse_754_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_754_1"><button class="btn btn-outline-danger"><span class="job_id">754 : Job ID ccdcc3806e544545b515c9db727c7f7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_754_1" data-parent="#job_list___sub_accordion_754" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_754_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position == "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_755"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_755_1" aria-expanded="false" aria-controls="job_list___sub_collapse_755_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_755_1"><button class="btn btn-outline-success"><span class="job_id">755 : Job ID 84781bb62d4f4f7088194ecfad85b4ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_755_1" data-parent="#job_list___sub_accordion_755" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_755_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position &lt; "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6ca6ee0d67d48aa4: '&lt;' not supported between instances of 'NoneType' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029A98269610&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029A9826B620&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-800/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A98291400&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpa8n8pl1o.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpa8n8pl1o.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029A982915E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpj5awe_ex.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000029A9571E390&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpj5awe_ex.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_756"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_756_1" aria-expanded="false" aria-controls="job_list___sub_collapse_756_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_756_1"><button class="btn btn-outline-success"><span class="job_id">756 : Job ID 974ddaf5983a45cc8da7d402db657892</span></button></div></a><div aria-labelledby="job_list___sub_heading_756_1" data-parent="#job_list___sub_accordion_756" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_756_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position &lt;= "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e4f48e44c5937e503: '&lt;=' not supported between instances of 'NoneType' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000018AD90D58B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000018AD90D7980&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2266/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000018AD90FD7C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp366365r7.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp366365r7.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000018AD90FD9A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpwere2g3t.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000018AD6F7FEF0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpwere2g3t.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &lt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&lt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_757"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_757_1" aria-expanded="false" aria-controls="job_list___sub_collapse_757_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_757_1"><button class="btn btn-outline-success"><span class="job_id">757 : Job ID 9b0f03c711b64c34bbb9fc0bd6029beb</span></button></div></a><div aria-labelledby="job_list___sub_heading_757_1" data-parent="#job_list___sub_accordion_757" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_757_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position &gt; "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e1299dcea7bb925f2: '&gt;' not supported between instances of 'NoneType' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F6B17C5820&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F6B17C7B00&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1527/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F6B17E9940&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpj2kofxj1.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpj2kofxj1.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001F6B17E9B20&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpcps36ohn.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001F6B06B2000&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpcps36ohn.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt; "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 22.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_758"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_758_1" aria-expanded="false" aria-controls="job_list___sub_collapse_758_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_758_1"><button class="btn btn-outline-success"><span class="job_id">758 : Job ID 48084f66707346e5a72953443440fa75</span></button></div></a><div aria-labelledby="job_list___sub_heading_758_1" data-parent="#job_list___sub_accordion_758" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_758_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position &gt;= "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ee843967d74cc81e2: '&gt;=' not supported between instances of 'NoneType' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B76DDB54F0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B76DDB7920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-57/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B76DDE1790&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp4ube6abh.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp4ube6abh.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B76DDE1970&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp5lxy00ub.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B76CCD95B0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp5lxy00ub.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components salt = secrets.token_bytes(self._SALT_SIZE) timestamp = int(time.time()) watermark_id = str(uuid.uuid4()) # Derive encryption key derived_key = self._derive_key(key, salt) # Create watermark payload payload = { "version": self._VERSION, "id": watermark_id, "timestamp": timestamp, "secret": secret, "salt": base64.b64encode(salt).decode("ascii"), } # Encrypt the payload encrypted_payload = self._encrypt_payload(payload, derived_key) # Open PDF with PyMuPDF doc = fitz.open(stream=data, filetype="pdf") try: # Ensure the PDF has at least one page for fragment embedding if doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page() except RuntimeError: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" except Exception: # If there are any issues, fall back to metadata-only position = "metadata-only" # Add watermark to XMP metadata self._embed_in_xmp(doc, encrypted_payload, watermark_id) # Add backup to document info self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) &gt; if position &gt;= "metadata-only": ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: '&gt;=' not supported between instances of 'NoneType' and 'str' robust_xmp_watermark.py:167: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 6 failed, 36 passed, 23 warnings in 21.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_759"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_759_1" aria-expanded="false" aria-controls="job_list___sub_collapse_759_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_759_1"><button class="btn btn-outline-danger"><span class="job_id">759 : Job ID 90f90d25d8cc4397b821a5f1b0bb8c41</span></button></div></a><div aria-labelledby="job_list___sub_heading_759_1" data-parent="#job_list___sub_accordion_759" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_759_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position is "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr robust_xmp_watermark.py:167 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\robust_xmp_watermark.py:167: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? if position is "metadata-only": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_760"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_760_1" aria-expanded="false" aria-controls="job_list___sub_collapse_760_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_760_1"><button class="btn btn-outline-danger"><span class="job_id">760 : Job ID 02ed4b1c60f54fe09823963d772855ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_760_1" data-parent="#job_list___sub_accordion_760" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_760_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 20), end pos: (167, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if position is not "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr robust_xmp_watermark.py:167 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\robust_xmp_watermark.py:167: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="? if position is not "metadata-only": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_761"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_761_1" aria-expanded="false" aria-controls="job_list___sub_collapse_761_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_761_1"><button class="btn btn-outline-danger"><span class="job_id">761 : Job ID b40b0bad3e1b4e76b83dd3b2ec378907</span></button></div></a><div aria-labelledby="job_list___sub_heading_761_1" data-parent="#job_list___sub_accordion_761" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_761_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 34), end pos: (337, 35)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count == 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_762"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_762_1" aria-expanded="false" aria-controls="job_list___sub_collapse_762_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_762_1"><button class="btn btn-outline-danger"><span class="job_id">762 : Job ID 46e5cfb2e1b7432fa636977d32c7b009</span></button></div></a><div aria-labelledby="job_list___sub_heading_762_1" data-parent="#job_list___sub_accordion_762" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_762_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 34), end pos: (337, 35)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count != 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_763"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_763_1" aria-expanded="false" aria-controls="job_list___sub_collapse_763_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_763_1"><button class="btn btn-outline-danger"><span class="job_id">763 : Job ID 600976277ea648d98a5146a3f31515ad</span></button></div></a><div aria-labelledby="job_list___sub_heading_763_1" data-parent="#job_list___sub_accordion_763" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_763_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 34), end pos: (337, 35)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count &lt; 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_764"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_764_1" aria-expanded="false" aria-controls="job_list___sub_collapse_764_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_764_1"><button class="btn btn-outline-danger"><span class="job_id">764 : Job ID 1dafbbcb27fb464ba047392f4c8618f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_764_1" data-parent="#job_list___sub_accordion_764" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_764_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 34), end pos: (337, 35)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count &lt;= 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_765"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_765_1" aria-expanded="false" aria-controls="job_list___sub_collapse_765_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_765_1"><button class="btn btn-outline-danger"><span class="job_id">765 : Job ID 74494c2836c6484e9be116723aa10257</span></button></div></a><div aria-labelledby="job_list___sub_heading_765_1" data-parent="#job_list___sub_accordion_765" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_765_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 34), end pos: (337, 35)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count &gt;= 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_766"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_766_1" aria-expanded="false" aria-controls="job_list___sub_collapse_766_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_766_1"><button class="btn btn-outline-danger"><span class="job_id">766 : Job ID 63d243aab3da4c0c9b2e4add3b7b4de5</span></button></div></a><div aria-labelledby="job_list___sub_heading_766_1" data-parent="#job_list___sub_accordion_766" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_766_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 34), end pos: (365, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) == 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_767"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_767_1" aria-expanded="false" aria-controls="job_list___sub_collapse_767_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_767_1"><button class="btn btn-outline-danger"><span class="job_id">767 : Job ID cca1f751545647d89e79e72675fca7a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_767_1" data-parent="#job_list___sub_accordion_767" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_767_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 42), end pos: (408, 44)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Eq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) == 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_768"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_768_1" aria-expanded="false" aria-controls="job_list___sub_collapse_768_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_768_1"><button class="btn btn-outline-danger"><span class="job_id">768 : Job ID 8d0cfc609f12462ba1cc93b746c1f4af</span></button></div></a><div aria-labelledby="job_list___sub_heading_768_1" data-parent="#job_list___sub_accordion_768" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_768_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Eq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) == self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_769"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_769_1" aria-expanded="false" aria-controls="job_list___sub_collapse_769_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_769_1"><button class="btn btn-outline-success"><span class="job_id">769 : Job ID f233a942a35c40bc877a9bc5edf4711b</span></button></div></a><div aria-labelledby="job_list___sub_heading_769_1" data-parent="#job_list___sub_accordion_769" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_769_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Eq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) == self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022784A6B800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022781F54950&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-388/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022781F54950&gt; encrypted_payload = 'Czrqh8rNqshGb2RaE1Lvf6pB4mYhmgqEVueibl0XwFB01HMElZ5JiK2VLOlH+Z3yrL5dqmXkpRWEtaaWJikeaEdH3EitRycEDRcddW8Yi5XIR1B/bORXh...b4Lc1CMDRCHEdur4f3Ody0umOC+M9dJddyTggGEM8OdQX/jgMcoa5//7ZEIYesRZTVC3bqxkYCqZnJwUhGCXYQGsTG4RueNVCYCsPD0z/kPgbKEoY2KcDo' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) == self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_770"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_770_1" aria-expanded="false" aria-controls="job_list___sub_collapse_770_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_770_1"><button class="btn btn-outline-danger"><span class="job_id">770 : Job ID 36d770a9c44e48b0a63d3b27f89e1868</span></button></div></a><div aria-labelledby="job_list___sub_heading_770_1" data-parent="#job_list___sub_accordion_770" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_770_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 34), end pos: (365, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) != 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_771"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_771_1" aria-expanded="false" aria-controls="job_list___sub_collapse_771_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_771_1"><button class="btn btn-outline-danger"><span class="job_id">771 : Job ID d85fa84582ca4ce787ff6ffbf1113784</span></button></div></a><div aria-labelledby="job_list___sub_heading_771_1" data-parent="#job_list___sub_accordion_771" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_771_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 42), end pos: (408, 44)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) != 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_772"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_772_1" aria-expanded="false" aria-controls="job_list___sub_collapse_772_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_772_1"><button class="btn btn-outline-success"><span class="job_id">772 : Job ID 3deb6f842d104e019594716c3f5664d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_772_1" data-parent="#job_list___sub_accordion_772" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_772_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_NotEq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) != self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215636709197Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215637617550Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_773"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_773_1" aria-expanded="false" aria-controls="job_list___sub_collapse_773_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_773_1"><button class="btn btn-outline-danger"><span class="job_id">773 : Job ID b78a882b835b4621a443fbb9f6cf9c98</span></button></div></a><div aria-labelledby="job_list___sub_heading_773_1" data-parent="#job_list___sub_accordion_773" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_773_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_NotEq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) != self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_774"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_774_1" aria-expanded="false" aria-controls="job_list___sub_collapse_774_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_774_1"><button class="btn btn-outline-danger"><span class="job_id">774 : Job ID 8744f810ff1f4d5ebe828881d3dd30b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_774_1" data-parent="#job_list___sub_accordion_774" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_774_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 34), end pos: (365, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) &lt; 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_775"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_775_1" aria-expanded="false" aria-controls="job_list___sub_collapse_775_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_775_1"><button class="btn btn-outline-danger"><span class="job_id">775 : Job ID c8fa93fea58d40f5bd3905ac432a8411</span></button></div></a><div aria-labelledby="job_list___sub_heading_775_1" data-parent="#job_list___sub_accordion_775" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_775_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 42), end pos: (408, 44)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) &lt; 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_776"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_776_1" aria-expanded="false" aria-controls="job_list___sub_collapse_776_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_776_1"><button class="btn btn-outline-danger"><span class="job_id">776 : Job ID 7061875ad8d044228e646539103916ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_776_1" data-parent="#job_list___sub_accordion_776" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_776_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Lt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) &lt; self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_777"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_777_1" aria-expanded="false" aria-controls="job_list___sub_collapse_777_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_777_1"><button class="btn btn-outline-success"><span class="job_id">777 : Job ID f59522d740cf4e1c8fc1ba86e7c4e07f</span></button></div></a><div aria-labelledby="job_list___sub_heading_777_1" data-parent="#job_list___sub_accordion_777" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_777_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Lt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &lt; self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BA90AF77A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001BA8F97E210&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1239/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001BA8F97E210&gt; encrypted_payload = 'PmslrGLFzJKgeGgXi9tEBR+XLDrJj4uYWsI4om7fUpePa7XBNfa1VTWhvPU3cWttkPXCaHKomMtIw5vYHS1aPn/6e2DaQ7WWsHdNmBFuHl/mEDoLY4IJ6...mhxY0/eRByE5cIjLsZunFuq0/rW/2JW+6iUStdTraL3DuDs0Xh82s1e24XATh9+Vv5VTnwcniQEMupstsjQ3tykhXDAauXbzQJF7lBn+lHweJLITkh7jE6' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &lt; self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_778"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_778_1" aria-expanded="false" aria-controls="job_list___sub_collapse_778_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_778_1"><button class="btn btn-outline-danger"><span class="job_id">778 : Job ID 6c30c611e85341e0a95231489b6e65d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_778_1" data-parent="#job_list___sub_accordion_778" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_778_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 34), end pos: (365, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) &lt;= 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_779"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_779_1" aria-expanded="false" aria-controls="job_list___sub_collapse_779_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_779_1"><button class="btn btn-outline-danger"><span class="job_id">779 : Job ID ccaadedaaf424c0ab4fe1150bdc13f2a</span></button></div></a><div aria-labelledby="job_list___sub_heading_779_1" data-parent="#job_list___sub_accordion_779" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_779_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 42), end pos: (408, 44)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) &lt;= 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_780"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_780_1" aria-expanded="false" aria-controls="job_list___sub_collapse_780_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_780_1"><button class="btn btn-outline-danger"><span class="job_id">780 : Job ID 2ea4aad58ab24ced9daeb6780f0a5e29</span></button></div></a><div aria-labelledby="job_list___sub_heading_780_1" data-parent="#job_list___sub_accordion_780" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_780_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_LtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) &lt;= self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_781"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_781_1" aria-expanded="false" aria-controls="job_list___sub_collapse_781_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_781_1"><button class="btn btn-outline-success"><span class="job_id">781 : Job ID 62181ba5e2fc474dabdf0583a93043b0</span></button></div></a><div aria-labelledby="job_list___sub_heading_781_1" data-parent="#job_list___sub_accordion_781" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_781_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_LtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &lt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016E1AA179B0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000016E188BCDD0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2437/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000016E188BCDD0&gt; encrypted_payload = 'kKBPb/RCWUWjARWkbWnKYyHfajWf+Kq4fgIgg2rDW2bqWBfdDdqm+9acDnTTKpOZtEW1GlyeoJFqqXvj5AtRUxlW9tXcjSgosf0U04SmW7aKSnPDhMEtW...kTC9iQpvjGHzXHOgKUD3mgAB0ObeYFTzIAnRAcqFswFiYpudulEP39DauptKdz/IHzhFX+J0bxf2Qc+N24UQNkczIyrVMP+LGg72YO1r38rOpOapztj698' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &lt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_782"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_782_1" aria-expanded="false" aria-controls="job_list___sub_collapse_782_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_782_1"><button class="btn btn-outline-danger"><span class="job_id">782 : Job ID 220a140686034a01b6fd257a197f9e2f</span></button></div></a><div aria-labelledby="job_list___sub_heading_782_1" data-parent="#job_list___sub_accordion_782" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_782_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 34), end pos: (365, 36)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) &gt; 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_783"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_783_1" aria-expanded="false" aria-controls="job_list___sub_collapse_783_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_783_1"><button class="btn btn-outline-danger"><span class="job_id">783 : Job ID fdec9929ed164cdbada3d0612e9a8b8e</span></button></div></a><div aria-labelledby="job_list___sub_heading_783_1" data-parent="#job_list___sub_accordion_783" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_783_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 42), end pos: (408, 44)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) &gt; 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_784"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_784_1" aria-expanded="false" aria-controls="job_list___sub_collapse_784_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_784_1"><button class="btn btn-outline-danger"><span class="job_id">784 : Job ID 766327bd468a4fd1a393bcf6ec0838f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_784_1" data-parent="#job_list___sub_accordion_784" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_784_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Gt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) &gt; self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_785"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_785_1" aria-expanded="false" aria-controls="job_list___sub_collapse_785_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_785_1"><button class="btn btn-outline-danger"><span class="job_id">785 : Job ID 700e2eb9f5e64ce2956339198d92bbbb</span></button></div></a><div aria-labelledby="job_list___sub_heading_785_1" data-parent="#job_list___sub_accordion_785" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_785_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Gt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt; self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_786"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_786_1" aria-expanded="false" aria-controls="job_list___sub_collapse_786_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_786_1"><button class="btn btn-outline-success"><span class="job_id">786 : Job ID fac53f85c4fb4b4db322e36478ca583a</span></button></div></a><div aria-labelledby="job_list___sub_heading_786_1" data-parent="#job_list___sub_accordion_786" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_786_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) is self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T153501429730Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T153502283256Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_787"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_787_1" aria-expanded="false" aria-controls="job_list___sub_collapse_787_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_787_1"><button class="btn btn-outline-success"><span class="job_id">787 : Job ID d6e06bf2ef8b40f2be7014943484000e</span></button></div></a><div aria-labelledby="job_list___sub_heading_787_1" data-parent="#job_list___sub_accordion_787" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_787_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) is self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000168B639B560&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000168B522BC50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1163/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000168B522BC50&gt; encrypted_payload = 'CJqubKxYoNaPz01yMeXVihXUSoqTDQ1i8Y3NSXjXSVJqUWvarAUzOevaVGaRCkS8aABOOQXWpRIsuV/2T69t1dhK1IPaHaKB8suaw+pA91ZLoLdKtLdTf...N+6frrKXDvoamdzLmS25arBIlDJRcB9JGL0O2LSIXat3ZJwCBRitevFxW+r1rCYEp654sZ/RdnfYZMaAmc8UVl/r94qWJO72PgWdjd7IKZiGKhZFR5TtxD' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) is self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_788"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_788_1" aria-expanded="false" aria-controls="job_list___sub_collapse_788_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_788_1"><button class="btn btn-outline-danger"><span class="job_id">788 : Job ID e97677e39079438091c30aa9166722ef</span></button></div></a><div aria-labelledby="job_list___sub_heading_788_1" data-parent="#job_list___sub_accordion_788" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_788_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 30), end pos: (418, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if len(fragments) is not self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_789"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_789_1" aria-expanded="false" aria-controls="job_list___sub_collapse_789_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_789_1"><button class="btn btn-outline-danger"><span class="job_id">789 : Job ID 8d924059e0534a1b85f060df04170f7d</span></button></div></a><div aria-labelledby="job_list___sub_heading_789_1" data-parent="#job_list___sub_accordion_789" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_789_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 35), end pos: (434, 37)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) is not self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_790"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_790_1" aria-expanded="false" aria-controls="job_list___sub_collapse_790_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_790_1"><button class="btn btn-outline-success"><span class="job_id">790 : Job ID 0c14fda3eba646c6ac49b62ed424229a</span></button></div></a><div aria-labelledby="job_list___sub_heading_790_1" data-parent="#job_list___sub_accordion_790" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_790_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=114" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (114, 11), end pos: (114, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -111,7 +111,7 @@ Returns: Watermarked PDF as bytes """ - if not HAS_PYMUPDF: + if HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: PyMuPDF is required for robust XMP watermarking _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614eed17f81c671c75c7: PyMuPDF is required for robust XMP watermarking ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000230993E9490&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000230993EB800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1796/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000230994115E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpq9kgwrmm.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpq9kgwrmm.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000230994117C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpjnurnkyg.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000230968056D0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpjnurnkyg.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_791"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_791_1" aria-expanded="false" aria-controls="job_list___sub_collapse_791_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_791_1"><button class="btn btn-outline-success"><span class="job_id">791 : Job ID bc6b8489cac94ab3a4e6175fe68145df</span></button></div></a><div aria-labelledby="job_list___sub_heading_791_1" data-parent="#job_list___sub_accordion_791" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_791_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=118" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (118, 11), end pos: (118, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -115,7 +115,7 @@ raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) - if not secret.strip(): + if secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Secret must be a non-empty string _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ec9d364d7a1a0a601: Secret must be a non-empty string ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029431F85760&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029431F87920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-786/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029431FB1790&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp55occxij.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp55occxij.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000029431FB1970&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpn16l2o37.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002942FE34F50&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpn16l2o37.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_792"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_792_1" aria-expanded="false" aria-controls="job_list___sub_collapse_792_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_792_1"><button class="btn btn-outline-success"><span class="job_id">792 : Job ID 511e1f3dcea3430eb75d69048f5fc6cd</span></button></div></a><div aria-labelledby="job_list___sub_heading_792_1" data-parent="#job_list___sub_accordion_792" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_792_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=120" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (120, 11), end pos: (120, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -117,7 +117,7 @@ data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") - if not key.strip(): + if key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Key must be a non-empty string _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6c42001ce69a7ffa: Key must be a non-empty string ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000132B5315700&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000132B53178C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-233/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000132B5341700&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp0f926hq9.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp0f926hq9.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000132B53418E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp5ir65wc5.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000132B4187710&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp5ir65wc5.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_793"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_793_1" aria-expanded="false" aria-controls="job_list___sub_collapse_793_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_793_1"><button class="btn btn-outline-success"><span class="job_id">793 : Job ID 3b5125b90c314b6ab3c046371e73fc27</span></button></div></a><div aria-labelledby="job_list___sub_heading_793_1" data-parent="#job_list___sub_accordion_793" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_793_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=197" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (197, 11), end pos: (197, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -194,7 +194,7 @@ position: str | None = None, ) -&gt; bool: """Check if watermarking is applicable.""" - if not HAS_PYMUPDF: + if HAS_PYMUPDF: return False try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FFs..s..s.................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 36 passed, 3 skipped, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_794"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_794_1" aria-expanded="false" aria-controls="job_list___sub_collapse_794_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_794_1"><button class="btn btn-outline-success"><span class="job_id">794 : Job ID dcd6c56d4c0343ec9ea10dd6994e9e42</span></button></div></a><div aria-labelledby="job_list___sub_heading_794_1" data-parent="#job_list___sub_accordion_794" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_794_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=222" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (222, 11), end pos: (222, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -219,7 +219,7 @@ SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ - if not HAS_PYMUPDF: + if HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000218A7A279E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000218A5641940&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-591/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000218A5641940&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-591/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:223: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_795"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_795_1" aria-expanded="false" aria-controls="job_list___sub_collapse_795_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_795_1"><button class="btn btn-outline-success"><span class="job_id">795 : Job ID 6c07bcf58ffe4bf28ae02389033af0ab</span></button></div></a><div aria-labelledby="job_list___sub_heading_795_1" data-parent="#job_list___sub_accordion_795" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_795_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=226" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (226, 11), end pos: (226, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -223,7 +223,7 @@ raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) - if not key.strip(): + if key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf")</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021D01C3B800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021D7F0BB590&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1446/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000021D7F0BB590&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1446/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:227: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_796"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_796_1" aria-expanded="false" aria-controls="job_list___sub_collapse_796_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_796_1"><button class="btn btn-outline-success"><span class="job_id">796 : Job ID 8defbfabb54141899a35b054a822143f</span></button></div></a><div aria-labelledby="job_list___sub_heading_796_1" data-parent="#job_list___sub_accordion_796" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_796_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=235" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (235, 15), end pos: (235, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -232,7 +232,7 @@ # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) - if not encrypted_payload: + if encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.........F.................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T212213757935Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T212214574643Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000028158C45CD0&gt; encrypted_payload = 'GNUDLCm1FBVhB+6z0aETsAiJII4zKzj0k+YwR3OWmbOqT0f5vVTnkXrmckC3G7FTDQuzmhly9x0ZJD9lUzeJQajsm6FXA4URpwsy' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002815B837A10&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000028158C45CD0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1930/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000028158C45CD0&gt; encrypted_payload = 'GNUDLCm1FBVhB+6z0aETsAiJII4zKzj0k+YwR3OWmbOqT0f5vVTnkXrmckC3G7FTDQuzmhly9x0ZJD9lUzeJQajsm6FXA4URpwsy' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 9 failed, 33 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_797"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_797_1" aria-expanded="false" aria-controls="job_list___sub_collapse_797_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_797_1"><button class="btn btn-outline-success"><span class="job_id">797 : Job ID 8d30092d47104b5b9a4ebf9e35662bde</span></button></div></a><div aria-labelledby="job_list___sub_heading_797_1" data-parent="#job_list___sub_accordion_797" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_797_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=239" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (239, 15), end pos: (239, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -236,7 +236,7 @@ # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) - if not encrypted_payload: + if encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019E845AB950&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019E818DB080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1419/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019E818DB080&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1419/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf") try: # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) if not encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) if encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) if not encrypted_payload: &gt; raise SecretNotFoundError("No robust XMP watermark found in PDF") E watermarking_method.SecretNotFoundError: No robust XMP watermark found in PDF robust_xmp_watermark.py:244: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_798"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_798_1" aria-expanded="false" aria-controls="job_list___sub_collapse_798_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_798_1"><button class="btn btn-outline-success"><span class="job_id">798 : Job ID d34438cf78d44b80acd291980a660409</span></button></div></a><div aria-labelledby="job_list___sub_heading_798_1" data-parent="#job_list___sub_accordion_798" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_798_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=243" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (243, 15), end pos: (243, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -240,7 +240,7 @@ # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) - if not encrypted_payload: + if encrypted_payload: raise SecretNotFoundError("No robust XMP watermark found in PDF") # Decrypt and extract secret</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000012690A8B7A0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001268DEF2840&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2082/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001268DEF2840&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2082/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf") try: # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) if not encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) if not encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) if encrypted_payload: &gt; raise SecretNotFoundError("No robust XMP watermark found in PDF") E watermarking_method.SecretNotFoundError: No robust XMP watermark found in PDF robust_xmp_watermark.py:244: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_799"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_799_1" aria-expanded="false" aria-controls="job_list___sub_collapse_799_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_799_1"><button class="btn btn-outline-success"><span class="job_id">799 : Job ID dfaaac6c70094bb88a564f08d7ea5571</span></button></div></a><div aria-labelledby="job_list___sub_heading_799_1" data-parent="#job_list___sub_accordion_799" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_799_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=114" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (114, 11), end pos: (114, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -111,7 +111,7 @@ Returns: Watermarked PDF as bytes """ - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: PyMuPDF is required for robust XMP watermarking _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ebb9e363c12b9865e: PyMuPDF is required for robust XMP watermarking ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B340335640&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B340337A40&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-778/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B34035D8B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpxb_grz3b.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpxb_grz3b.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001B34035DA90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkb0rmq_a.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001B33F15E090&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpkb0rmq_a.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:115: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_800"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_800_1" aria-expanded="false" aria-controls="job_list___sub_collapse_800_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_800_1"><button class="btn btn-outline-success"><span class="job_id">800 : Job ID 67b3b8ce5c974a7580600ba06434c9ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_800_1" data-parent="#job_list___sub_accordion_800" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_800_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=118" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (118, 11), end pos: (118, 29)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -115,7 +115,7 @@ raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) - if not secret.strip(): + if not not secret.strip(): raise ValueError("Secret must be a non-empty string") if not key.strip(): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Secret must be a non-empty string _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614ed41c1ee8943c29a7: Secret must be a non-empty string ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EF217A5610&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not not secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EF217A7A10&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2184/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not not secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EF217CD820&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpuz5igr6n.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpuz5igr6n.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not not secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EF217CDA00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpqeyqph2m.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EF1EF1EC60&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpqeyqph2m.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not not secret.strip(): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string robust_xmp_watermark.py:119: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_801"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_801_1" aria-expanded="false" aria-controls="job_list___sub_collapse_801_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_801_1"><button class="btn btn-outline-success"><span class="job_id">801 : Job ID 1987344dafb34a8eba062632503c9635</span></button></div></a><div aria-labelledby="job_list___sub_heading_801_1" data-parent="#job_list___sub_accordion_801" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_801_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=120" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (120, 11), end pos: (120, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -117,7 +117,7 @@ data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") - if not key.strip(): + if not not key.strip(): raise ValueError("Key must be a non-empty string") # Generate watermark components</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: Key must be a non-empty string _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e6d17777eb36a20a4: Key must be a non-empty string ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000285DDA09940&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not not key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000285DDA0B920&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1529/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not not key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000285DDA31760&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmplqg233k5.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmplqg233k5.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not not key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000285DDA31940&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp9lo2ort9.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000285DB5C2990&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp9lo2ort9.pdf') secret = 'test-secret', key = 'test-key', intended_for = None, position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: """Add a robust watermark to the PDF. Args: pdf: Source PDF to watermark secret: Secret to embed key: Password for encryption position: Optional position hint ('metadata-only' for simpler embedding) Returns: Watermarked PDF as bytes """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not secret.strip(): raise ValueError("Secret must be a non-empty string") if not not key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:121: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_802"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_802_1" aria-expanded="false" aria-controls="job_list___sub_collapse_802_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_802_1"><button class="btn btn-outline-danger"><span class="job_id">802 : Job ID b22dc0459c494d419bcce1df531f98df</span></button></div></a><div aria-labelledby="job_list___sub_heading_802_1" data-parent="#job_list___sub_accordion_802" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_802_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 15), end pos: (148, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if not doc.page_count == 0: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_803"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_803_1" aria-expanded="false" aria-controls="job_list___sub_collapse_803_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_803_1"><button class="btn btn-outline-danger"><span class="job_id">803 : Job ID ebde1a3f09b649e5bc13f5846a4359f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_803_1" data-parent="#job_list___sub_accordion_803" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_803_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (167, 11), end pos: (167, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -164,7 +164,7 @@ self._embed_in_document_info(doc, encrypted_payload, watermark_id) # Add distributed fragments (unless disabled or not possible) - if position != "metadata-only": + if not position != "metadata-only": self._embed_fragments(doc, encrypted_payload, watermark_id, derived_key) # Return the watermarked PDF</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_804"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_804_1" aria-expanded="false" aria-controls="job_list___sub_collapse_804_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_804_1"><button class="btn btn-outline-danger"><span class="job_id">804 : Job ID ac9cec23cd5c454eb5a5fb1b28045a90</span></button></div></a><div aria-labelledby="job_list___sub_heading_804_1" data-parent="#job_list___sub_accordion_804" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_804_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=174" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (174, 15), end pos: (174, 54)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -171,7 +171,7 @@ try: result = doc.write() except ValueError as e: - if "cannot save with zero pages" in str(e): + if not "cannot save with zero pages" in str(e): # Create a new document with proper structure new_doc = fitz.open() new_doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_805"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_805_1" aria-expanded="false" aria-controls="job_list___sub_collapse_805_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_805_1"><button class="btn btn-outline-success"><span class="job_id">805 : Job ID 37203dcf21fe46d684182b3314233041</span></button></div></a><div aria-labelledby="job_list___sub_heading_805_1" data-parent="#job_list___sub_accordion_805" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_805_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=197" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (197, 11), end pos: (197, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -194,7 +194,7 @@ position: str | None = None, ) -&gt; bool: """Check if watermarking is applicable.""" - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: return False try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FFs..s..s.................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 36 passed, 3 skipped, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_806"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_806_1" aria-expanded="false" aria-controls="job_list___sub_collapse_806_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_806_1"><button class="btn btn-outline-success"><span class="job_id">806 : Job ID 28c669e8a19c4cb9af56ad81e66d7d19</span></button></div></a><div aria-labelledby="job_list___sub_heading_806_1" data-parent="#job_list___sub_accordion_806" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_806_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=222" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (222, 11), end pos: (222, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -219,7 +219,7 @@ SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000268B68479E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000268B66B21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2243/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000268B66B21B0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2243/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") E watermarking_method.WatermarkingError: PyMuPDF is required for robust XMP watermarking robust_xmp_watermark.py:223: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_807"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_807_1" aria-expanded="false" aria-controls="job_list___sub_collapse_807_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_807_1"><button class="btn btn-outline-success"><span class="job_id">807 : Job ID 0df86e9468524f7ca365273667e69857</span></button></div></a><div aria-labelledby="job_list___sub_heading_807_1" data-parent="#job_list___sub_accordion_807" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_807_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=226" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (226, 11), end pos: (226, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -223,7 +223,7 @@ raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) - if not key.strip(): + if not not key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf")</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019788ABB650&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019784D26150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1036/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000019784D26150&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1036/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not not key.strip(): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string robust_xmp_watermark.py:227: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_808"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_808_1" aria-expanded="false" aria-controls="job_list___sub_collapse_808_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_808_1"><button class="btn btn-outline-success"><span class="job_id">808 : Job ID e95846411e3f449b89568fca3f198240</span></button></div></a><div aria-labelledby="job_list___sub_heading_808_1" data-parent="#job_list___sub_accordion_808" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_808_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=235" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (235, 15), end pos: (235, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -232,7 +232,7 @@ # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) - if not encrypted_payload: + if not not encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000027E3CE3F650&gt; encrypted_payload = 'yqScdxuizk3xUxuu6b4Qmo09diPoKNOGgE+Ls56OcRSG+XLclAeNocVgMqiCVuNXG44FRgTRfdorvwKJOJwHbocbeq5jAp0NDSWu' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027E3FC07800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000027E3CE3F650&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2465/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000027E3CE3F650&gt; encrypted_payload = 'yqScdxuizk3xUxuu6b4Qmo09diPoKNOGgE+Ls56OcRSG+XLclAeNocVgMqiCVuNXG44FRgTRfdorvwKJOJwHbocbeq5jAp0NDSWu' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_809"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_809_1" aria-expanded="false" aria-controls="job_list___sub_collapse_809_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_809_1"><button class="btn btn-outline-success"><span class="job_id">809 : Job ID b96ac055238e433281e0c4bff2fe3880</span></button></div></a><div aria-labelledby="job_list___sub_heading_809_1" data-parent="#job_list___sub_accordion_809" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_809_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=239" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (239, 15), end pos: (239, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -236,7 +236,7 @@ # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) - if not encrypted_payload: + if not not encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) </pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001760BA6B800&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017608FC11F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1658/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000017608FC11F0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1658/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf") try: # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) if not encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) if not not encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) if not encrypted_payload: &gt; raise SecretNotFoundError("No robust XMP watermark found in PDF") E watermarking_method.SecretNotFoundError: No robust XMP watermark found in PDF robust_xmp_watermark.py:244: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_810"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_810_1" aria-expanded="false" aria-controls="job_list___sub_collapse_810_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_810_1"><button class="btn btn-outline-success"><span class="job_id">810 : Job ID f226b49e587f445a9ab1c7566c3afc52</span></button></div></a><div aria-labelledby="job_list___sub_heading_810_1" data-parent="#job_list___sub_accordion_810" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_810_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=243" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (243, 15), end pos: (243, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -240,7 +240,7 @@ # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) - if not encrypted_payload: + if not not encrypted_payload: raise SecretNotFoundError("No robust XMP watermark found in PDF") # Decrypt and extract secret</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001913B0DB740&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001913AF421B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2176/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001913AF421B0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2176/test_read_secret_roundtrip_rob0/robust-xmp_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret. Args: pdf: Watermarked PDF key: Decryption key Returns: Extracted secret Raises: SecretNotFoundError: If no watermark is found InvalidKeyError: If key is incorrect """ if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for robust XMP watermarking") data = load_pdf_bytes(pdf) if not key.strip(): raise ValueError("Key must be a non-empty string") doc = fitz.open(stream=data, filetype="pdf") try: # Try to read from document info first (more reliable for full payload) encrypted_payload = self._extract_from_document_info(doc) if not encrypted_payload: # Fallback to XMP metadata encrypted_payload = self._extract_from_xmp(doc) if not encrypted_payload: # Last resort: try to reconstruct from fragments encrypted_payload = self._reconstruct_from_fragments(doc) if not not encrypted_payload: &gt; raise SecretNotFoundError("No robust XMP watermark found in PDF") E watermarking_method.SecretNotFoundError: No robust XMP watermark found in PDF robust_xmp_watermark.py:244: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_811"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_811_1" aria-expanded="false" aria-controls="job_list___sub_collapse_811_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_811_1"><button class="btn btn-outline-danger"><span class="job_id">811 : Job ID a7e70d916042428e88100335e8cf3da6</span></button></div></a><div aria-labelledby="job_list___sub_heading_811_1" data-parent="#job_list___sub_accordion_811" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_811_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 19), end pos: (337, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if not doc.page_count &gt; 0: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_812"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_812_1" aria-expanded="false" aria-controls="job_list___sub_collapse_812_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_812_1"><button class="btn btn-outline-success"><span class="job_id">812 : Job ID a705b3a84c714fe28fdf2489655c8ecf</span></button></div></a><div aria-labelledby="job_list___sub_heading_812_1" data-parent="#job_list___sub_accordion_812" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_812_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=361" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (361, 15), end pos: (361, 71)</button></a></pre><pre>operator: core/AddNot, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -358,7 +358,7 @@ producer = metadata.get("producer", "") # Check if this looks like our watermark format - if "watermark" in keywords and "Tatou Security" in producer: + if not "watermark" in keywords and "Tatou Security" in producer: # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt;</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T234251245236Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T234252122210Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_813"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_813_1" aria-expanded="false" aria-controls="job_list___sub_collapse_813_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_813_1"><button class="btn btn-outline-danger"><span class="job_id">813 : Job ID 87998cb35de5471291a763e50bf55b9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_813_1" data-parent="#job_list___sub_accordion_813" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_813_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=363" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (363, 19), end pos: (363, 35)</button></a></pre><pre>operator: core/AddNot, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -360,7 +360,7 @@ # Check if this looks like our watermark format if "watermark" in keywords and "Tatou Security" in producer: # Try subject first (partial payload with watermark ID) - if "tw-" in subject: + if not "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; if len(parts) &gt;= 3: return parts[2] # The encrypted payload part</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_814"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_814_1" aria-expanded="false" aria-controls="job_list___sub_collapse_814_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_814_1"><button class="btn btn-outline-danger"><span class="job_id">814 : Job ID 7cbbad3656c8478790bc825a38ba0cf6</span></button></div></a><div aria-labelledby="job_list___sub_heading_814_1" data-parent="#job_list___sub_accordion_814" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_814_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 23), end pos: (365, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if not len(parts) &gt;= 3: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_815"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_815_1" aria-expanded="false" aria-controls="job_list___sub_collapse_815_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_815_1"><button class="btn btn-outline-danger"><span class="job_id">815 : Job ID d19a858f2e974a679394c781e1bed5ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_815_1" data-parent="#job_list___sub_accordion_815" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_815_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=369" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (369, 19), end pos: (369, 24)</button></a></pre><pre>operator: core/AddNot, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -366,7 +366,7 @@ return parts[2] # The encrypted payload part # Fallback to title (full payload) - if title: + if not title: return title except Exception: # nosec B110 # noqa: S110 pass</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_816"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_816_1" aria-expanded="false" aria-controls="job_list___sub_collapse_816_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_816_1"><button class="btn btn-outline-success"><span class="job_id">816 : Job ID 69b9569f1fed46d1b741f33de287c9b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_816_1" data-parent="#job_list___sub_accordion_816" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_816_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=383" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (383, 15), end pos: (383, 53)</button></a></pre><pre>operator: core/AddNot, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -380,7 +380,7 @@ title = metadata.get("title", "") # Check if this looks like our watermark format - if creator.startswith("Tatou-") and title: + if not creator.startswith("Tatou-") and title: # The full payload is stored in title return title except Exception: # nosec B110 # noqa: S110</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000016670ED21B0&gt; encrypted_payload = 'bEaBgaVYcVmjRjDhzxpHLWlveSGd6ULFHabTSy+qge8qMjDp1xtVOXU74j/1VwzZPHUL+vBOyuH1WMZfOpD0tAvY6P9m1AX+Q0WY' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016671067A70&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000016670ED21B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1532/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000016670ED21B0&gt; encrypted_payload = 'bEaBgaVYcVmjRjDhzxpHLWlveSGd6ULFHabTSy+qge8qMjDp1xtVOXU74j/1VwzZPHUL+vBOyuH1WMZfOpD0tAvY6P9m1AX+Q0WY' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_817"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_817_1" aria-expanded="false" aria-controls="job_list___sub_collapse_817_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_817_1"><button class="btn btn-outline-danger"><span class="job_id">817 : Job ID 16196ab89eea49abb11fb35b4e65789f</span></button></div></a><div aria-labelledby="job_list___sub_heading_817_1" data-parent="#job_list___sub_accordion_817" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_817_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=405" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (405, 27), end pos: (405, 63)</button></a></pre><pre>operator: core/AddNot, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -402,7 +402,7 @@ content = annot.info.get("content", "") author = annot.info.get("title", "") # Sometimes title is used - if author.startswith("tw-") and content: + if not author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") if len(parts) &gt;= 2:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_818"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_818_1" aria-expanded="false" aria-controls="job_list___sub_collapse_818_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_818_1"><button class="btn btn-outline-danger"><span class="job_id">818 : Job ID 693b75c33bae48eaa754bde0b9e362aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_818_1" data-parent="#job_list___sub_accordion_818" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_818_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 31), end pos: (408, 46)</button></a></pre><pre>operator: core/AddNot, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if not len(parts) &gt;= 2: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_819"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_819_1" aria-expanded="false" aria-controls="job_list___sub_collapse_819_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_819_1"><button class="btn btn-outline-danger"><span class="job_id">819 : Job ID 0d58bfd0d5fe41abbe2b2dbe5272dd17</span></button></div></a><div aria-labelledby="job_list___sub_heading_819_1" data-parent="#job_list___sub_accordion_819" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_819_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=418" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (418, 15), end pos: (418, 52)</button></a></pre><pre>operator: core/AddNot, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -415,7 +415,7 @@ continue # Reconstruct payload from fragments - if len(fragments) &gt;= self._MIN_FRAGMENTS: + if not len(fragments) &gt;= self._MIN_FRAGMENTS: reconstructed = b"" for i in sorted(fragments.keys()): reconstructed += fragments[i]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_820"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_820_1" aria-expanded="false" aria-controls="job_list___sub_collapse_820_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_820_1"><button class="btn btn-outline-success"><span class="job_id">820 : Job ID 0fb7cff2b6614ff38845a2aebc264d48</span></button></div></a><div aria-labelledby="job_list___sub_heading_820_1" data-parent="#job_list___sub_accordion_820" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_820_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 15), end pos: (434, 58)</button></a></pre><pre>operator: core/AddNot, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if not len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022BBCF67830&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022BBAD8E150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-945/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022BBAD8E150&gt; encrypted_payload = 'F68/g85OM3yygs8aAN8LFg9D/7iuCTGnmqC+d5ryj1wIdFo07RbaE207GI3Q9gvuP2oZdIwW/aoq5c3dqSX81DWpqvg6PNs9jpYCVmXzw6gkcL11fl8zc...1jiO6DzStPsI8EsuIglpcKSD4pCWXhXM2FT8DwVofC5h8AnuRYCvXPGW/sFRdGswqhU1XWmZ8U6C2jXxHm8dlOnEkDeAfJ4Lgv1iEIHaUK1GtOq7Oc5w5k' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if not len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_821"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_821_1" aria-expanded="false" aria-controls="job_list___sub_collapse_821_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_821_1"><button class="btn btn-outline-success"><span class="job_id">821 : Job ID 33c50655a6e9495fbd61852c2774eb63</span></button></div></a><div aria-labelledby="job_list___sub_heading_821_1" data-parent="#job_list___sub_accordion_821" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_821_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=449" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (449, 19), end pos: (452, 17)</button></a></pre><pre>operator: core/AddNot, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -446,7 +446,7 @@ payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure - if ( + if not ( isinstance(payload, dict) and payload.get("version") == self._VERSION ):</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BCE2A67950&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001BCDFAEB080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-866/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001BCDFAEB080&gt; encrypted_payload = '6hPfNENf00Sz7WRJpuXDCBwf2IA7Wtns/crpPdHdib9ZWqExE1c53jMz3WdpCxc8sHuvr0/M5TQ6X+RclFtuNfNdZLuxaBB2FyzQoEzxdXx1DMbr2TSXT...WsjhFcI4OhY+/Rb/PVeqnx6x/S0FhLU23p50hC7El/E4SyoNAX4zvx0EOkH4JPaa+DxLe455Waq+ZPn+Vtctwa5nBumjIGb/0E8uOjdpxx3A0FZ0IC7fTO' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if not ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error &gt; raise SecretNotFoundError("Invalid watermark format or corrupted data") E watermarking_method.SecretNotFoundError: Invalid watermark format or corrupted data robust_xmp_watermark.py:456: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_822"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_822_1" aria-expanded="false" aria-controls="job_list___sub_collapse_822_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_822_1"><button class="btn btn-outline-success"><span class="job_id">822 : Job ID fabeef6e8639421cab97a0f41e648123</span></button></div></a><div aria-labelledby="job_list___sub_heading_822_1" data-parent="#job_list___sub_accordion_822" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_822_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=53" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (53, 18), end pos: (53, 22)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -50,7 +50,7 @@ try: import fitz # PyMuPDF - HAS_PYMUPDF = True + HAS_PYMUPDF = False except ImportError: HAS_PYMUPDF = False </pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FFs..s..s.................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 36 passed, 3 skipped, 23 warnings in 20.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_823"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_823_1" aria-expanded="false" aria-controls="job_list___sub_collapse_823_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_823_1"><button class="btn btn-outline-success"><span class="job_id">823 : Job ID 488aaf7feef84c1eb43e8f46099d2e7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_823_1" data-parent="#job_list___sub_accordion_823" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_823_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (204, 19), end pos: (204, 23)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -201,7 +201,7 @@ data = load_pdf_bytes(pdf) doc = fitz.open(stream=data, filetype="pdf") doc.close() - return True + return False except Exception: return False </pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FFs..s..s.................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 36 passed, 3 skipped, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_824"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_824_1" aria-expanded="false" aria-controls="job_list___sub_collapse_824_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_824_1"><button class="btn btn-outline-danger"><span class="job_id">824 : Job ID ffb592be444a44878313fff874f32069</span></button></div></a><div aria-labelledby="job_list___sub_heading_824_1" data-parent="#job_list___sub_accordion_824" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_824_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=55" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (55, 18), end pos: (55, 23)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -52,7 +52,7 @@ HAS_PYMUPDF = True except ImportError: - HAS_PYMUPDF = False + HAS_PYMUPDF = True class RobustXmpWatermark(WatermarkingMethod):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_825"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_825_1" aria-expanded="false" aria-controls="job_list___sub_collapse_825_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_825_1"><button class="btn btn-outline-danger"><span class="job_id">825 : Job ID ef545aa4847e4dfb99c787deab6ad985</span></button></div></a><div aria-labelledby="job_list___sub_heading_825_1" data-parent="#job_list___sub_accordion_825" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_825_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=198" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (198, 19), end pos: (198, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -195,7 +195,7 @@ ) -&gt; bool: """Check if watermarking is applicable.""" if not HAS_PYMUPDF: - return False + return True try: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_826"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_826_1" aria-expanded="false" aria-controls="job_list___sub_collapse_826_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_826_1"><button class="btn btn-outline-danger"><span class="job_id">826 : Job ID da2d180024d44aa988d912b43e25ab12</span></button></div></a><div aria-labelledby="job_list___sub_heading_826_1" data-parent="#job_list___sub_accordion_826" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_826_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=206" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (206, 19), end pos: (206, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -203,7 +203,7 @@ doc.close() return True except Exception: - return False + return True def read_secret(self, pdf: PdfSource, key: str) -&gt; str: """Extract and decrypt the watermark secret.</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 23.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_827"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_827_1" aria-expanded="false" aria-controls="job_list___sub_collapse_827_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_827_1"><button class="btn btn-outline-danger"><span class="job_id">827 : Job ID bec42951a481463f98eeaf2a2ae0c78b</span></button></div></a><div aria-labelledby="job_list___sub_heading_827_1" data-parent="#job_list___sub_accordion_827" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_827_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=361" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (361, 39), end pos: (361, 42)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -358,7 +358,7 @@ producer = metadata.get("producer", "") # Check if this looks like our watermark format - if "watermark" in keywords and "Tatou Security" in producer: + if "watermark" in keywords or "Tatou Security" in producer: # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt;</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_828"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_828_1" aria-expanded="false" aria-controls="job_list___sub_collapse_828_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_828_1"><button class="btn btn-outline-danger"><span class="job_id">828 : Job ID da8eb8b1037f47e4804e4770d9c0418d</span></button></div></a><div aria-labelledby="job_list___sub_heading_828_1" data-parent="#job_list___sub_accordion_828" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_828_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=383" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (383, 44), end pos: (383, 47)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -380,7 +380,7 @@ title = metadata.get("title", "") # Check if this looks like our watermark format - if creator.startswith("Tatou-") and title: + if creator.startswith("Tatou-") or title: # The full payload is stored in title return title except Exception: # nosec B110 # noqa: S110</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_829"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_829_1" aria-expanded="false" aria-controls="job_list___sub_collapse_829_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_829_1"><button class="btn btn-outline-danger"><span class="job_id">829 : Job ID ea367057d5694224956a7450c082ee82</span></button></div></a><div aria-labelledby="job_list___sub_heading_829_1" data-parent="#job_list___sub_accordion_829" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_829_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=405" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (405, 52), end pos: (405, 55)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -402,7 +402,7 @@ content = annot.info.get("content", "") author = annot.info.get("title", "") # Sometimes title is used - if author.startswith("tw-") and content: + if author.startswith("tw-") or content: # Extract fragment index parts = author.split("-") if len(parts) &gt;= 2:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_830"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_830_1" aria-expanded="false" aria-controls="job_list___sub_collapse_830_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_830_1"><button class="btn btn-outline-danger"><span class="job_id">830 : Job ID a2261d5c7777426daca58ff651c90d4d</span></button></div></a><div aria-labelledby="job_list___sub_heading_830_1" data-parent="#job_list___sub_accordion_830" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_830_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=451" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (451, 20), end pos: (451, 23)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -448,7 +448,7 @@ # Validate payload structure if ( isinstance(payload, dict) - and payload.get("version") == self._VERSION + or payload.get("version") == self._VERSION ): return payload["secret"] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_831"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_831_1" aria-expanded="false" aria-controls="job_list___sub_collapse_831_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_831_1"><button class="btn btn-outline-danger"><span class="job_id">831 : Job ID 93141431edec4df3ad8176a883288277</span></button></div></a><div aria-labelledby="job_list___sub_heading_831_1" data-parent="#job_list___sub_accordion_831" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_831_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=348" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (348, 16), end pos: (348, 24)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -345,7 +345,7 @@ except Exception: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments - continue + break def _extract_from_xmp(self, doc: fitz.Document) -&gt; str | None: """Extract watermark from XMP metadata (document info implementation)."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_832"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_832_1" aria-expanded="false" aria-controls="job_list___sub_collapse_832_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_832_1"><button class="btn btn-outline-danger"><span class="job_id">832 : Job ID 6ccb67013af446e7886ee820d480a07d</span></button></div></a><div aria-labelledby="job_list___sub_heading_832_1" data-parent="#job_list___sub_accordion_832" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_832_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=413" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (413, 36), end pos: (413, 44)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -410,7 +410,7 @@ fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content) except (ValueError, TypeError): - continue + break except Exception: # nosec B112 # noqa: S112 continue </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_833"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_833_1" aria-expanded="false" aria-controls="job_list___sub_collapse_833_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_833_1"><button class="btn btn-outline-danger"><span class="job_id">833 : Job ID d6a28eb0447644e8bbd9e3ff70aa2a97</span></button></div></a><div aria-labelledby="job_list___sub_heading_833_1" data-parent="#job_list___sub_accordion_833" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_833_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=415" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (415, 24), end pos: (415, 32)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -412,7 +412,7 @@ except (ValueError, TypeError): continue except Exception: # nosec B112 # noqa: S112 - continue + break # Reconstruct payload from fragments if len(fragments) &gt;= self._MIN_FRAGMENTS:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_834"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_834_1" aria-expanded="false" aria-controls="job_list___sub_collapse_834_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_834_1"><button class="btn btn-outline-danger"><span class="job_id">834 : Job ID d6f94935511e43bbbdb9e48b94b82a70</span></button></div></a><div aria-labelledby="job_list___sub_heading_834_1" data-parent="#job_list___sub_accordion_834" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_834_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=54" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (54, 7), end pos: (54, 18)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -51,7 +51,7 @@ import fitz # PyMuPDF HAS_PYMUPDF = True -except ImportError: +except CosmicRayTestingException: HAS_PYMUPDF = False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_835"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_835_1" aria-expanded="false" aria-controls="job_list___sub_collapse_835_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_835_1"><button class="btn btn-outline-danger"><span class="job_id">835 : Job ID f055a54b12f44d1a941dab04faff245e</span></button></div></a><div aria-labelledby="job_list___sub_heading_835_1" data-parent="#job_list___sub_accordion_835" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_835_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=152" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (152, 23), end pos: (152, 35)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -149,7 +149,7 @@ try: # Try to add a blank page if PDF structure allows it doc.new_page() - except RuntimeError: + except CosmicRayTestingException: # PDF structure is too minimal, use metadata-only approach position = "metadata-only" </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_836"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_836_1" aria-expanded="false" aria-controls="job_list___sub_collapse_836_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_836_1"><button class="btn btn-outline-danger"><span class="job_id">836 : Job ID ffe6bbb976b9469e841588de6b0c7ad8</span></button></div></a><div aria-labelledby="job_list___sub_heading_836_1" data-parent="#job_list___sub_accordion_836" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_836_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (156, 15), end pos: (156, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -153,7 +153,7 @@ # PDF structure is too minimal, use metadata-only approach position = "metadata-only" - except Exception: + except CosmicRayTestingException: # If there are any issues, fall back to metadata-only position = "metadata-only" </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_837"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_837_1" aria-expanded="false" aria-controls="job_list___sub_collapse_837_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_837_1"><button class="btn btn-outline-danger"><span class="job_id">837 : Job ID 203b930bc3774f38aa2808aa6e2a9991</span></button></div></a><div aria-labelledby="job_list___sub_heading_837_1" data-parent="#job_list___sub_accordion_837" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_837_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=173" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (173, 15), end pos: (173, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -170,7 +170,7 @@ # Return the watermarked PDF try: result = doc.write() - except ValueError as e: + except CosmicRayTestingException as e: if "cannot save with zero pages" in str(e): # Create a new document with proper structure new_doc = fitz.open()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_838"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_838_1" aria-expanded="false" aria-controls="job_list___sub_collapse_838_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_838_1"><button class="btn btn-outline-danger"><span class="job_id">838 : Job ID 411b1504d9c74e8a967613823c1beb85</span></button></div></a><div aria-labelledby="job_list___sub_heading_838_1" data-parent="#job_list___sub_accordion_838" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_838_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=205" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (205, 15), end pos: (205, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -202,7 +202,7 @@ doc = fitz.open(stream=data, filetype="pdf") doc.close() return True - except Exception: + except CosmicRayTestingException: return False def read_secret(self, pdf: PdfSource, key: str) -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_839"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_839_1" aria-expanded="false" aria-controls="job_list___sub_collapse_839_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_839_1"><button class="btn btn-outline-danger"><span class="job_id">839 : Job ID 7a9718a2dab34b329566eecfa82074eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_839_1" data-parent="#job_list___sub_accordion_839" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_839_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=346" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (346, 19), end pos: (346, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -343,7 +343,7 @@ # Add as form field or annotation page.add_text_annot([0, 0], fragment_b64) - except Exception: # nosec B112 # noqa: S112 + except CosmicRayTestingException: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments continue </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_840"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_840_1" aria-expanded="false" aria-controls="job_list___sub_collapse_840_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_840_1"><button class="btn btn-outline-danger"><span class="job_id">840 : Job ID 16de8b7dbfcb45dd8b9ec431a634a64c</span></button></div></a><div aria-labelledby="job_list___sub_heading_840_1" data-parent="#job_list___sub_accordion_840" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_840_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=371" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (371, 15), end pos: (371, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -368,7 +368,7 @@ # Fallback to title (full payload) if title: return title - except Exception: # nosec B110 # noqa: S110 + except CosmicRayTestingException: # nosec B110 # noqa: S110 pass return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_841"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_841_1" aria-expanded="false" aria-controls="job_list___sub_collapse_841_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_841_1"><button class="btn btn-outline-danger"><span class="job_id">841 : Job ID 6140d12a332848098d753404478c4cae</span></button></div></a><div aria-labelledby="job_list___sub_heading_841_1" data-parent="#job_list___sub_accordion_841" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_841_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=386" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (386, 15), end pos: (386, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -383,7 +383,7 @@ if creator.startswith("Tatou-") and title: # The full payload is stored in title return title - except Exception: # nosec B110 # noqa: S110 + except CosmicRayTestingException: # nosec B110 # noqa: S110 pass return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_842"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_842_1" aria-expanded="false" aria-controls="job_list___sub_collapse_842_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_842_1"><button class="btn btn-outline-danger"><span class="job_id">842 : Job ID 18da6b666bb744e29fd56f38292b0e2e</span></button></div></a><div aria-labelledby="job_list___sub_heading_842_1" data-parent="#job_list___sub_accordion_842" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_842_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=412" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (412, 40), end pos: (412, 50)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -409,7 +409,7 @@ try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content) - except (ValueError, TypeError): + except (CosmicRayTestingException, TypeError): continue except Exception: # nosec B112 # noqa: S112 continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_843"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_843_1" aria-expanded="false" aria-controls="job_list___sub_collapse_843_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_843_1"><button class="btn btn-outline-danger"><span class="job_id">843 : Job ID 300ea04d6e61482492b648ca3d89e734</span></button></div></a><div aria-labelledby="job_list___sub_heading_843_1" data-parent="#job_list___sub_accordion_843" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_843_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=412" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (412, 52), end pos: (412, 61)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -409,7 +409,7 @@ try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content) - except (ValueError, TypeError): + except (ValueError, CosmicRayTestingException): continue except Exception: # nosec B112 # noqa: S112 continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_844"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_844_1" aria-expanded="false" aria-controls="job_list___sub_collapse_844_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_844_1"><button class="btn btn-outline-danger"><span class="job_id">844 : Job ID a3a80e55f1ca49ebb4f32f96f21982e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_844_1" data-parent="#job_list___sub_accordion_844" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_844_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=414" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (414, 27), end pos: (414, 36)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -411,7 +411,7 @@ fragments[fragment_idx] = base64.b64decode(content) except (ValueError, TypeError): continue - except Exception: # nosec B112 # noqa: S112 + except CosmicRayTestingException: # nosec B112 # noqa: S112 continue # Reconstruct payload from fragments</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_845"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_845_1" aria-expanded="false" aria-controls="job_list___sub_collapse_845_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_845_1"><button class="btn btn-outline-danger"><span class="job_id">845 : Job ID dd4066c9465b4272b24176b89832cd86</span></button></div></a><div aria-labelledby="job_list___sub_heading_845_1" data-parent="#job_list___sub_accordion_845" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_845_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=424" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (424, 15), end pos: (424, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -421,7 +421,7 @@ reconstructed += fragments[i] return reconstructed.decode("utf-8") - except Exception: # nosec B110 # noqa: S110 + except CosmicRayTestingException: # nosec B110 # noqa: S110 pass return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_846"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_846_1" aria-expanded="false" aria-controls="job_list___sub_collapse_846_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_846_1"><button class="btn btn-outline-danger"><span class="job_id">846 : Job ID ba2c1f60f95a4b749a6a5372cbdedc76</span></button></div></a><div aria-labelledby="job_list___sub_heading_846_1" data-parent="#job_list___sub_accordion_846" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_846_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=458" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (458, 15), end pos: (458, 30)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -455,7 +455,7 @@ # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") - except InvalidKeyError: + except CosmicRayTestingException: raise except SecretNotFoundError: raise</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_847"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_847_1" aria-expanded="false" aria-controls="job_list___sub_collapse_847_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_847_1"><button class="btn btn-outline-success"><span class="job_id">847 : Job ID 6e00df1012ed43e88afd741b73636db2</span></button></div></a><div aria-labelledby="job_list___sub_heading_847_1" data-parent="#job_list___sub_accordion_847" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_847_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=460" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (460, 15), end pos: (460, 34)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -457,7 +457,7 @@ except InvalidKeyError: raise - except SecretNotFoundError: + except CosmicRayTestingException: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131225020521Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131225905342Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_848"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_848_1" aria-expanded="false" aria-controls="job_list___sub_collapse_848_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_848_1"><button class="btn btn-outline-danger"><span class="job_id">848 : Job ID fcd699d63b404980831431411c25ebe5</span></button></div></a><div aria-labelledby="job_list___sub_heading_848_1" data-parent="#job_list___sub_accordion_848" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_848_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (462, 15), end pos: (462, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -459,7 +459,7 @@ raise except SecretNotFoundError: raise - except Exception as e: + except CosmicRayTestingException as e: msg = f"Failed to decrypt watermark with provided key: {e}" raise InvalidKeyError(msg) from e </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_849"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_849_1" aria-expanded="false" aria-controls="job_list___sub_collapse_849_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_849_1"><button class="btn btn-outline-danger"><span class="job_id">849 : Job ID f364df8c7dc44207baa22a796f4ef183</span></button></div></a><div aria-labelledby="job_list___sub_heading_849_1" data-parent="#job_list___sub_accordion_849" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_849_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (80, 34), end pos: (80, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -77,7 +77,7 @@ # Constants for the watermarking scheme _XMP_NAMESPACE: Final[str] = "http://tatou.security/watermark/" _XMP_PREFIX: Final[str] = "tw" - _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute + _FRAGMENT_COUNT: Final[int] = 4 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_850"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_850_1" aria-expanded="false" aria-controls="job_list___sub_collapse_850_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_850_1"><button class="btn btn-outline-success"><span class="job_id">850 : Job ID 4b2eaaa668db4eeebdc5ba6c128217c8</span></button></div></a><div aria-labelledby="job_list___sub_heading_850_1" data-parent="#job_list___sub_accordion_850" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_850_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (80, 34), end pos: (80, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -77,7 +77,7 @@ # Constants for the watermarking scheme _XMP_NAMESPACE: Final[str] = "http://tatou.security/watermark/" _XMP_PREFIX: Final[str] = "tw" - _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute + _FRAGMENT_COUNT: Final[int] = 2 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180255520738Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180256529211Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_851"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_851_1" aria-expanded="false" aria-controls="job_list___sub_collapse_851_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_851_1"><button class="btn btn-outline-danger"><span class="job_id">851 : Job ID 3a73981ebd534af38318cabda1fb3d90</span></button></div></a><div aria-labelledby="job_list___sub_heading_851_1" data-parent="#job_list___sub_accordion_851" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_851_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=81" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (81, 33), end pos: (81, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -78,7 +78,7 @@ _XMP_NAMESPACE: Final[str] = "http://tatou.security/watermark/" _XMP_PREFIX: Final[str] = "tw" _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute - _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction + _MIN_FRAGMENTS: Final[int] = 3 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_852"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_852_1" aria-expanded="false" aria-controls="job_list___sub_collapse_852_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_852_1"><button class="btn btn-outline-danger"><span class="job_id">852 : Job ID 1fbeb499487d41f2a1dbadaa0a66b81a</span></button></div></a><div aria-labelledby="job_list___sub_heading_852_1" data-parent="#job_list___sub_accordion_852" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_852_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=81" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (81, 33), end pos: (81, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -78,7 +78,7 @@ _XMP_NAMESPACE: Final[str] = "http://tatou.security/watermark/" _XMP_PREFIX: Final[str] = "tw" _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute - _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction + _MIN_FRAGMENTS: Final[int] = 1 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_853"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_853_1" aria-expanded="false" aria-controls="job_list___sub_collapse_853_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_853_1"><button class="btn btn-outline-danger"><span class="job_id">853 : Job ID 28b90f43b86e40329d57aecc27ab8cb6</span></button></div></a><div aria-labelledby="job_list___sub_heading_853_1" data-parent="#job_list___sub_accordion_853" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_853_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (82, 29), end pos: (82, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -79,7 +79,7 @@ _XMP_PREFIX: Final[str] = "tw" _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction - _SALT_SIZE: Final[int] = 16 # Salt size for key derivation + _SALT_SIZE: Final[int] = 17 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_854"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_854_1" aria-expanded="false" aria-controls="job_list___sub_collapse_854_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_854_1"><button class="btn btn-outline-danger"><span class="job_id">854 : Job ID 099e6fe237344761a1dfa68664b75a8e</span></button></div></a><div aria-labelledby="job_list___sub_heading_854_1" data-parent="#job_list___sub_accordion_854" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_854_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (82, 29), end pos: (82, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -79,7 +79,7 @@ _XMP_PREFIX: Final[str] = "tw" _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction - _SALT_SIZE: Final[int] = 16 # Salt size for key derivation + _SALT_SIZE: Final[int] = 15 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_855"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_855_1" aria-expanded="false" aria-controls="job_list___sub_collapse_855_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_855_1"><button class="btn btn-outline-danger"><span class="job_id">855 : Job ID 7ac66e433f374ec0845a345fd55b3859</span></button></div></a><div aria-labelledby="job_list___sub_heading_855_1" data-parent="#job_list___sub_accordion_855" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_855_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=83" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (83, 34), end pos: (83, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -80,7 +80,7 @@ _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation - _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations + _KEY_ITERATIONS: Final[int] = 100001 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_856"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_856_1" aria-expanded="false" aria-controls="job_list___sub_collapse_856_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_856_1"><button class="btn btn-outline-danger"><span class="job_id">856 : Job ID 3311eaf129794cbdadefad6f627878a7</span></button></div></a><div aria-labelledby="job_list___sub_heading_856_1" data-parent="#job_list___sub_accordion_856" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_856_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=83" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (83, 34), end pos: (83, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -80,7 +80,7 @@ _FRAGMENT_COUNT: Final[int] = 3 # Number of fragments to distribute _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation - _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations + _KEY_ITERATIONS: Final[int] = 99999 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_857"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_857_1" aria-expanded="false" aria-controls="job_list___sub_collapse_857_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_857_1"><button class="btn btn-outline-danger"><span class="job_id">857 : Job ID ec47f846647a42cba96e199280dc65eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_857_1" data-parent="#job_list___sub_accordion_857" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_857_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (84, 27), end pos: (84, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -81,7 +81,7 @@ _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations - _VERSION: Final[int] = 1 # Watermark format version + _VERSION: Final[int] = 2 # Watermark format version @staticmethod def get_usage() -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_858"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_858_1" aria-expanded="false" aria-controls="job_list___sub_collapse_858_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_858_1"><button class="btn btn-outline-danger"><span class="job_id">858 : Job ID 17f67846a7a842f397e2521e615eb9d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_858_1" data-parent="#job_list___sub_accordion_858" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_858_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (84, 27), end pos: (84, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -81,7 +81,7 @@ _MIN_FRAGMENTS: Final[int] = 2 # Minimum fragments needed for reconstruction _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations - _VERSION: Final[int] = 1 # Watermark format version + _VERSION: Final[int] = 0 # Watermark format version @staticmethod def get_usage() -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_859"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_859_1" aria-expanded="false" aria-controls="job_list___sub_collapse_859_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_859_1"><button class="btn btn-outline-danger"><span class="job_id">859 : Job ID 79522ded83c7495b98863452c9a65f2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_859_1" data-parent="#job_list___sub_accordion_859" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_859_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 33), end pos: (148, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count == 1: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_860"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_860_1" aria-expanded="false" aria-controls="job_list___sub_collapse_860_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_860_1"><button class="btn btn-outline-danger"><span class="job_id">860 : Job ID f21602867b204361a580c34e4c84cce3</span></button></div></a><div aria-labelledby="job_list___sub_heading_860_1" data-parent="#job_list___sub_accordion_860" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_860_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (148, 33), end pos: (148, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -145,7 +145,7 @@ try: # Ensure the PDF has at least one page for fragment embedding - if doc.page_count == 0: + if doc.page_count == -1: try: # Try to add a blank page if PDF structure allows it doc.new_page()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_861"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_861_1" aria-expanded="false" aria-controls="job_list___sub_collapse_861_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_861_1"><button class="btn btn-outline-success"><span class="job_id">861 : Job ID d0ffc95a910147ddaf865b35be28053e</span></button></div></a><div aria-labelledby="job_list___sub_heading_861_1" data-parent="#job_list___sub_accordion_861" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_861_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=256" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (256, 19), end pos: (256, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -253,7 +253,7 @@ """Derive encryption key from password and salt.""" kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, # 256-bit key + length= 33, # 256-bit key salt=salt, iterations=self._KEY_ITERATIONS, )</pre></div><div class="alert alert-secondary"><pre class="diff">.........F...FF...F..F.........FF......... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: AESGCM key must be 128, 192, or 256 bits. _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e2ef881b54a38486a: AESGCM key must be 128, 192, or 256 bits. ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026DA9E15670&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; payload = {'id': '447c8b2b-7c1d-485b-a4df-aafc12b37b8d', 'salt': 'cqZUhI5nuIMSkPLSo9cbDQ==', 'secret': 'unit-test-secret', 'timestamp': 1760733339, ...} key = b'_\xdd\x945hx{T\x1fS\\\x9d\n\x8cJ\x80*\xd7!\xcc\xb7S\xc8\x04\xf0\xeaV\xde\x1f\xd0\x01\xae\x1c' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026DA9E17AA0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1800/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; payload = {'id': 'd1ec3705-156a-47fe-8997-83f97127d87c', 'salt': 'lclemiE0B9MZ3+c8ojA/4Q==', 'secret': 'unit-test-secret', 'timestamp': 1760733339, ...} key = b'\x98y\xbd\x00g\xdc\xf4\xbd\xdc\xaa\x97}\xec\x8a\xbd\xb2\xe9\xf3\x078\x9a\xe0\x1d\xbc\x01\x07\x10\xbf\x02\x95f\xcd&amp;' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026DA9E3D880&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpmznv8uxd.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; payload = {'id': 'e7826db9-78c0-4619-85a6-d3335d525584', 'salt': 'uagcGl2GkS7g6kH1iLVbVw==', 'secret': 'test-secret', 'timestamp': 1760733340, ...} key = b'\x1e\xdb\x13\x0e\xbf{\x99*G\xe2\x9c\xfeKX8)\xe0\xb6\xea\x94\xae#\x9c\x88\xa0\xf0\na\x92\xaf\x04t\x7f' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000026DA9E3DA60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpklluwwrn.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000026DA8DFAEA0&gt; payload = {'id': '034663f2-bb20-4bda-9106-b8949bbd773f', 'salt': 'm6oE3+XJBGTvsFpdbF3deQ==', 'secret': 'test-secret', 'timestamp': 1760733340, ...} key = b'V\x94@Ae\xab\xc8-\x18Zu\xa9\x8ee\xe6\x8c\xc6\x05\xbb\xe9Hk\x0b\xa5\x80o\xcc\x88m\xab\xb6~\x1c' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 7 failed, 35 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_862"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_862_1" aria-expanded="false" aria-controls="job_list___sub_collapse_862_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_862_1"><button class="btn btn-outline-success"><span class="job_id">862 : Job ID d718d8de2afd4dd0838f584ee8a6a060</span></button></div></a><div aria-labelledby="job_list___sub_heading_862_1" data-parent="#job_list___sub_accordion_862" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_862_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=256" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (256, 19), end pos: (256, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -253,7 +253,7 @@ """Derive encryption key from password and salt.""" kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, # 256-bit key + length= 31, # 256-bit key salt=salt, iterations=self._KEY_ITERATIONS, )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF...F..F.........FF......... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T152158731729Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T152159593804Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e010fbcfa488f8e5d: AESGCM key must be 128, 192, or 256 bits. ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError _____ TestAllWatermarkingMethods.test_add_watermark_and_shape[robust-xmp] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022D02F458E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; payload = {'id': 'b54e7d9e-a1fe-446c-b67a-97079c98a851', 'salt': 'ufEmlPUHuqSyaxYdMWmRjw==', 'secret': 'unit-test-secret', 'timestamp': 1760714524, ...} key = b'\xb9]\x11\x1f\x19\x1b$\xc4`\xd8\x147m5\x10T6\x998\xf3T\x04s&amp;6\xa5\x81\x88(\xa8~' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022D02F478C0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-952/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; payload = {'id': '3b7fe459-dc95-4de9-82d4-26409d959685', 'salt': 'rS7khllJSUD4AZXpk7Ut2A==', 'secret': 'unit-test-secret', 'timestamp': 1760714524, ...} key = b'\xe1\xbb\xb1\xe7n\xfd\xf1\xe5p!C|U\xd0nI.3\x1a\xeeQOI\xe5\xfb4\xfa\n\xfe@\xef' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022D02F71700&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp5y_ck5x3.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method_name, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", ) ..\test\test_watermarking_utilities.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; payload = {'id': '4e598caf-21b0-4c68-aa3f-abfedf8df2dc', 'salt': 'ZDfpr9Rl5vrNRdlziojYwA==', 'secret': 'test-secret', 'timestamp': 1760714525, ...} key = b"\xcc[\x80t\xd1\xdd'#:\x93\xd0\xe22\xda\x8f\x03\x1a\xf9\x9f\xaa\xb9U\xbb\x9a\xee\x91\xd5\xb5s\xbf?" def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000022D02F718E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp433v2nrb.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable if WMUtils.is_watermarking_applicable(method, sample_pdf_path): &gt; result = WMUtils.apply_watermark( method=method, pdf=sample_pdf_path, secret="test-secret", # pragma: allowlist secret key="test-key", # pragma: allowlist secret ) ..\test\test_watermarking_utilities.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:101: in apply_watermark return m.add_watermark( robust_xmp_watermark.py:141: in add_watermark encrypted_payload = self._encrypt_payload(payload, derived_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022D00E0E120&gt; payload = {'id': '71858795-87f8-4403-9798-9323aee11055', 'salt': 'VJsfk3fNZgq6A/KF5QalLw==', 'secret': 'test-secret', 'timestamp': 1760714525, ...} key = b'\x83\xb6\xf1\xde,\xad\x16)K\xe3\x0e\xe3Y%\x82\x98p\x10x\x08e\xf8\x91\xd8\x04\xfa\xdd9|\xfa\xfb' def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" &gt; aesgcm = AESGCM(key) ^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. robust_xmp_watermark.py:264: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[robust-xmp] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 14 failed, 28 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_863"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_863_1" aria-expanded="false" aria-controls="job_list___sub_collapse_863_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_863_1"><button class="btn btn-outline-success"><span class="job_id">863 : Job ID 11e7f520c8b84737855491d6d2c75c24</span></button></div></a><div aria-labelledby="job_list___sub_heading_863_1" data-parent="#job_list___sub_accordion_863" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_863_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=265" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (265, 36), end pos: (265, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -262,7 +262,7 @@ def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) - nonce = secrets.token_bytes(12) # 96-bit nonce for GCM + nonce = secrets.token_bytes( 13) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022BF41D6990&gt; encrypted_payload = 'h+G5tkYvlGZmoAPI4ALtXT3DEmLnbNEhV63YAvHrHRVT1MDpvHGARJQO9i3jT6DvafyTTJ7uE3QFrUsfn0WsweF4VDX1J7Cialuf8dJSGucMIX/ZRdgaw...eXzU1Hw26bdixYi3PnENrY+rCBFkfdD5hr8Rf5eJWHwGsV9OAiUxCv07MDdwHmVR2ZZNKfP25wuyG8FSKcr9vT3RmX5Gnuca1Ryi0mffhh/Y5/KWqK+g==' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022BF6D2F320&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022BF41D6990&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-961/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x0000022BF41D6990&gt; encrypted_payload = 'h+G5tkYvlGZmoAPI4ALtXT3DEmLnbNEhV63YAvHrHRVT1MDpvHGARJQO9i3jT6DvafyTTJ7uE3QFrUsfn0WsweF4VDX1J7Cialuf8dJSGucMIX/ZRdgaw...eXzU1Hw26bdixYi3PnENrY+rCBFkfdD5hr8Rf5eJWHwGsV9OAiUxCv07MDdwHmVR2ZZNKfP25wuyG8FSKcr9vT3RmX5Gnuca1Ryi0mffhh/Y5/KWqK+g==' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_864"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_864_1" aria-expanded="false" aria-controls="job_list___sub_collapse_864_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_864_1"><button class="btn btn-outline-success"><span class="job_id">864 : Job ID fae794f16c7443a7a3fb4b7c29e81aff</span></button></div></a><div aria-labelledby="job_list___sub_heading_864_1" data-parent="#job_list___sub_accordion_864" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_864_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=265" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (265, 36), end pos: (265, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -262,7 +262,7 @@ def _encrypt_payload(self, payload: dict[str, Any], key: bytes) -&gt; str: """Encrypt payload using AES-GCM and include salt.""" aesgcm = AESGCM(key) - nonce = secrets.token_bytes(12) # 96-bit nonce for GCM + nonce = secrets.token_bytes( 11) # 96-bit nonce for GCM payload_json = json.dumps(payload, separators=(",", ":")).encode("utf-8") ciphertext = aesgcm.encrypt(nonce, payload_json, None)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AE03BB2840&gt; encrypted_payload = 'atW7wh0842uuAC6LgCShp+2Fe8du+jD+sBBYEDeSl88dN9eYbE7SalNLYDhWU9AOF4R/d5UMcIcCOzJHs7OsaVxBoF+p3f6P+DsV+FFZjJy8saMmaVLDW...//yhr/+bHBTrmInEvhVi7RsZ3J+5m1B8ICvThTeMT6NKjNvgpg6JZeW9OII8Ldi4EupiMPmbMGr3k4/yiAp1fW8VB2zLcf7CVQayj6yANlZ4bcIzMkj6Q=' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001AE066CB6E0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AE03BB2840&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2199/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001AE03BB2840&gt; encrypted_payload = 'atW7wh0842uuAC6LgCShp+2Fe8du+jD+sBBYEDeSl88dN9eYbE7SalNLYDhWU9AOF4R/d5UMcIcCOzJHs7OsaVxBoF+p3f6P+DsV+FFZjJy8saMmaVLDW...//yhr/+bHBTrmInEvhVi7RsZ3J+5m1B8ICvThTeMT6NKjNvgpg6JZeW9OII8Ldi4EupiMPmbMGr3k4/yiAp1fW8VB2zLcf7CVQayj6yANlZ4bcIzMkj6Q=' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_865"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_865_1" aria-expanded="false" aria-controls="job_list___sub_collapse_865_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_865_1"><button class="btn btn-outline-danger"><span class="job_id">865 : Job ID e9977463b9564492ba16a57850edda7b</span></button></div></a><div aria-labelledby="job_list___sub_heading_865_1" data-parent="#job_list___sub_accordion_865" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_865_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=294" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (294, 47), end pos: (294, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -291,7 +291,7 @@ # Use a combination of standard and custom fields metadata.update( { - "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[:100]}", + "subject": f"tw-{watermark_id[: 9]}-{encrypted_payload[:100]}", "keywords": f"watermark,{watermark_id}", "producer": f"Tatou Security Watermarker v{self._VERSION}", }</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_866"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_866_1" aria-expanded="false" aria-controls="job_list___sub_collapse_866_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_866_1"><button class="btn btn-outline-danger"><span class="job_id">866 : Job ID d38abe88d1c04cc8bad22fd315414bfb</span></button></div></a><div aria-labelledby="job_list___sub_heading_866_1" data-parent="#job_list___sub_accordion_866" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_866_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=294" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (294, 47), end pos: (294, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -291,7 +291,7 @@ # Use a combination of standard and custom fields metadata.update( { - "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[:100]}", + "subject": f"tw-{watermark_id[: 7]}-{encrypted_payload[:100]}", "keywords": f"watermark,{watermark_id}", "producer": f"Tatou Security Watermarker v{self._VERSION}", }</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_867"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_867_1" aria-expanded="false" aria-controls="job_list___sub_collapse_867_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_867_1"><button class="btn btn-outline-danger"><span class="job_id">867 : Job ID 1514dddfad60476cbad7297fc102fa39</span></button></div></a><div aria-labelledby="job_list___sub_heading_867_1" data-parent="#job_list___sub_accordion_867" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_867_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=294" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (294, 71), end pos: (294, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -291,7 +291,7 @@ # Use a combination of standard and custom fields metadata.update( { - "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[:100]}", + "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[: 101]}", "keywords": f"watermark,{watermark_id}", "producer": f"Tatou Security Watermarker v{self._VERSION}", }</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_868"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_868_1" aria-expanded="false" aria-controls="job_list___sub_collapse_868_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_868_1"><button class="btn btn-outline-danger"><span class="job_id">868 : Job ID 9961bb85abd448ef8f214d3b00612f0b</span></button></div></a><div aria-labelledby="job_list___sub_heading_868_1" data-parent="#job_list___sub_accordion_868" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_868_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=294" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (294, 71), end pos: (294, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -291,7 +291,7 @@ # Use a combination of standard and custom fields metadata.update( { - "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[:100]}", + "subject": f"tw-{watermark_id[:8]}-{encrypted_payload[: 99]}", "keywords": f"watermark,{watermark_id}", "producer": f"Tatou Security Watermarker v{self._VERSION}", }</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_869"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_869_1" aria-expanded="false" aria-controls="job_list___sub_collapse_869_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_869_1"><button class="btn btn-outline-danger"><span class="job_id">869 : Job ID 7c0d4ab3be454009bee57354ec20ee50</span></button></div></a><div aria-labelledby="job_list___sub_heading_869_1" data-parent="#job_list___sub_accordion_869" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_869_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=309" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (309, 50), end pos: (309, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -306,7 +306,7 @@ metadata = doc.metadata metadata.update( { - "creator": f"Tatou-{watermark_id[:8]}", # Partial ID in creator + "creator": f"Tatou-{watermark_id[: 9]}", # Partial ID in creator "title": encrypted_payload, # Full payload in title (main storage) } )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_870"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_870_1" aria-expanded="false" aria-controls="job_list___sub_collapse_870_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_870_1"><button class="btn btn-outline-danger"><span class="job_id">870 : Job ID 188a1e1b22724b7f93c59fba53c570c8</span></button></div></a><div aria-labelledby="job_list___sub_heading_870_1" data-parent="#job_list___sub_accordion_870" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_870_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=309" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (309, 50), end pos: (309, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -306,7 +306,7 @@ metadata = doc.metadata metadata.update( { - "creator": f"Tatou-{watermark_id[:8]}", # Partial ID in creator + "creator": f"Tatou-{watermark_id[: 7]}", # Partial ID in creator "title": encrypted_payload, # Full payload in title (main storage) } )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_871"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_871_1" aria-expanded="false" aria-controls="job_list___sub_collapse_871_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_871_1"><button class="btn btn-outline-danger"><span class="job_id">871 : Job ID 8844e3ba91e240f881412ed754147549</span></button></div></a><div aria-labelledby="job_list___sub_heading_871_1" data-parent="#job_list___sub_accordion_871" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_871_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 69), end pos: (325, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 2 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_872"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_872_1" aria-expanded="false" aria-controls="job_list___sub_collapse_872_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_872_1"><button class="btn btn-outline-danger"><span class="job_id">872 : Job ID 923aa06ab7f94350a6758b09dd6f5999</span></button></div></a><div aria-labelledby="job_list___sub_heading_872_1" data-parent="#job_list___sub_accordion_872" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_872_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (325, 69), end pos: (325, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -322,7 +322,7 @@ """Distribute watermark fragments across PDF objects.""" # Split payload into fragments payload_bytes = encrypted_payload.encode("utf-8") - fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 + fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 0 fragments = [] for i in range(self._FRAGMENT_COUNT):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_873"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_873_1" aria-expanded="false" aria-controls="job_list___sub_collapse_873_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_873_1"><button class="btn btn-outline-danger"><span class="job_id">873 : Job ID 35a0968d389141f68fbd392950daae98</span></button></div></a><div aria-labelledby="job_list___sub_heading_873_1" data-parent="#job_list___sub_accordion_873" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_873_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 36), end pos: (337, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count &gt; 1: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_874"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_874_1" aria-expanded="false" aria-controls="job_list___sub_collapse_874_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_874_1"><button class="btn btn-outline-danger"><span class="job_id">874 : Job ID 4e834f65a2ee4152919b844d99333c97</span></button></div></a><div aria-labelledby="job_list___sub_heading_874_1" data-parent="#job_list___sub_accordion_874" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_874_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=337" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (337, 36), end pos: (337, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -334,7 +334,7 @@ # Add fragments to PDF as annotations or form fields for _i, fragment in enumerate(fragments): try: - if doc.page_count &gt; 0: + if doc.page_count &gt; -1: page = doc.load_page(0) # Use first page # Create invisible annotation with fragment data</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_875"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_875_1" aria-expanded="false" aria-controls="job_list___sub_collapse_875_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_875_1"><button class="btn btn-outline-danger"><span class="job_id">875 : Job ID e1ba50731d0e4b5caa13884581b817a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_875_1" data-parent="#job_list___sub_accordion_875" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_875_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=338" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (338, 41), end pos: (338, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -335,7 +335,7 @@ for _i, fragment in enumerate(fragments): try: if doc.page_count &gt; 0: - page = doc.load_page(0) # Use first page + page = doc.load_page( 1) # Use first page # Create invisible annotation with fragment data fragment_b64 = base64.b64encode(fragment).decode("ascii")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_876"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_876_1" aria-expanded="false" aria-controls="job_list___sub_collapse_876_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_876_1"><button class="btn btn-outline-danger"><span class="job_id">876 : Job ID 52ebf52c2ae843f8955613633758c3ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_876_1" data-parent="#job_list___sub_accordion_876" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_876_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=338" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (338, 41), end pos: (338, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -335,7 +335,7 @@ for _i, fragment in enumerate(fragments): try: if doc.page_count &gt; 0: - page = doc.load_page(0) # Use first page + page = doc.load_page( -1) # Use first page # Create invisible annotation with fragment data fragment_b64 = base64.b64encode(fragment).decode("ascii")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_877"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_877_1" aria-expanded="false" aria-controls="job_list___sub_collapse_877_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_877_1"><button class="btn btn-outline-danger"><span class="job_id">877 : Job ID 803c16e567034fa78590af0aed8cbf49</span></button></div></a><div aria-labelledby="job_list___sub_heading_877_1" data-parent="#job_list___sub_accordion_877" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_877_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=344" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (344, 41), end pos: (344, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -341,7 +341,7 @@ fragment_b64 = base64.b64encode(fragment).decode("ascii") # Add as form field or annotation - page.add_text_annot([0, 0], fragment_b64) + page.add_text_annot([ 1, 0], fragment_b64) except Exception: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_878"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_878_1" aria-expanded="false" aria-controls="job_list___sub_collapse_878_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_878_1"><button class="btn btn-outline-danger"><span class="job_id">878 : Job ID a7e7d5977c8a4528bd9cbaca92633954</span></button></div></a><div aria-labelledby="job_list___sub_heading_878_1" data-parent="#job_list___sub_accordion_878" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_878_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=344" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (344, 41), end pos: (344, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -341,7 +341,7 @@ fragment_b64 = base64.b64encode(fragment).decode("ascii") # Add as form field or annotation - page.add_text_annot([0, 0], fragment_b64) + page.add_text_annot([ -1, 0], fragment_b64) except Exception: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_879"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_879_1" aria-expanded="false" aria-controls="job_list___sub_collapse_879_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_879_1"><button class="btn btn-outline-danger"><span class="job_id">879 : Job ID 0b8c306ee7874ab98fc2590601b9aa94</span></button></div></a><div aria-labelledby="job_list___sub_heading_879_1" data-parent="#job_list___sub_accordion_879" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_879_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=344" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (344, 44), end pos: (344, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -341,7 +341,7 @@ fragment_b64 = base64.b64encode(fragment).decode("ascii") # Add as form field or annotation - page.add_text_annot([0, 0], fragment_b64) + page.add_text_annot([0, 1], fragment_b64) except Exception: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_880"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_880_1" aria-expanded="false" aria-controls="job_list___sub_collapse_880_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_880_1"><button class="btn btn-outline-danger"><span class="job_id">880 : Job ID c83e071a9518429c92ae67ac394a7bae</span></button></div></a><div aria-labelledby="job_list___sub_heading_880_1" data-parent="#job_list___sub_accordion_880" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_880_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=344" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (344, 44), end pos: (344, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -341,7 +341,7 @@ fragment_b64 = base64.b64encode(fragment).decode("ascii") # Add as form field or annotation - page.add_text_annot([0, 0], fragment_b64) + page.add_text_annot([0, -1], fragment_b64) except Exception: # nosec B112 # noqa: S112 # If we can't add annotations, skip fragments</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_881"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_881_1" aria-expanded="false" aria-controls="job_list___sub_collapse_881_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_881_1"><button class="btn btn-outline-danger"><span class="job_id">881 : Job ID 68c458e40d794701979ddf538b920165</span></button></div></a><div aria-labelledby="job_list___sub_heading_881_1" data-parent="#job_list___sub_accordion_881" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_881_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=364" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (364, 47), end pos: (364, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -361,7 +361,7 @@ if "watermark" in keywords and "Tatou Security" in producer: # Try subject first (partial payload with watermark ID) if "tw-" in subject: - parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; + parts = subject.split("-", 3) # tw-&lt;id&gt;-&lt;payload&gt; if len(parts) &gt;= 3: return parts[2] # The encrypted payload part </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_882"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_882_1" aria-expanded="false" aria-controls="job_list___sub_collapse_882_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_882_1"><button class="btn btn-outline-danger"><span class="job_id">882 : Job ID ea52d7813e6744c0889f7cdf3f2015d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_882_1" data-parent="#job_list___sub_accordion_882" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_882_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=364" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (364, 47), end pos: (364, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -361,7 +361,7 @@ if "watermark" in keywords and "Tatou Security" in producer: # Try subject first (partial payload with watermark ID) if "tw-" in subject: - parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; + parts = subject.split("-", 1) # tw-&lt;id&gt;-&lt;payload&gt; if len(parts) &gt;= 3: return parts[2] # The encrypted payload part </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_883"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_883_1" aria-expanded="false" aria-controls="job_list___sub_collapse_883_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_883_1"><button class="btn btn-outline-danger"><span class="job_id">883 : Job ID 0621af099354466e940b56e6df460dbe</span></button></div></a><div aria-labelledby="job_list___sub_heading_883_1" data-parent="#job_list___sub_accordion_883" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_883_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 37), end pos: (365, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) &gt;= 4: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_884"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_884_1" aria-expanded="false" aria-controls="job_list___sub_collapse_884_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_884_1"><button class="btn btn-outline-danger"><span class="job_id">884 : Job ID 9789b7a03ae54c769233ee795e165ac9</span></button></div></a><div aria-labelledby="job_list___sub_heading_884_1" data-parent="#job_list___sub_accordion_884" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_884_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=365" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (365, 37), end pos: (365, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -362,7 +362,7 @@ # Try subject first (partial payload with watermark ID) if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; - if len(parts) &gt;= 3: + if len(parts) &gt;= 2: return parts[2] # The encrypted payload part # Fallback to title (full payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_885"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_885_1" aria-expanded="false" aria-controls="job_list___sub_collapse_885_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_885_1"><button class="btn btn-outline-danger"><span class="job_id">885 : Job ID bc97dcb794f14068b2d98fd9d3739c39</span></button></div></a><div aria-labelledby="job_list___sub_heading_885_1" data-parent="#job_list___sub_accordion_885" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_885_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=366" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (366, 37), end pos: (366, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -363,7 +363,7 @@ if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; if len(parts) &gt;= 3: - return parts[2] # The encrypted payload part + return parts[ 3] # The encrypted payload part # Fallback to title (full payload) if title:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_886"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_886_1" aria-expanded="false" aria-controls="job_list___sub_collapse_886_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_886_1"><button class="btn btn-outline-danger"><span class="job_id">886 : Job ID bb73af04c65f44088eaf74aa723c4fd0</span></button></div></a><div aria-labelledby="job_list___sub_heading_886_1" data-parent="#job_list___sub_accordion_886" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_886_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=366" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (366, 37), end pos: (366, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -363,7 +363,7 @@ if "tw-" in subject: parts = subject.split("-", 2) # tw-&lt;id&gt;-&lt;payload&gt; if len(parts) &gt;= 3: - return parts[2] # The encrypted payload part + return parts[ 1] # The encrypted payload part # Fallback to title (full payload) if title:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_887"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_887_1" aria-expanded="false" aria-controls="job_list___sub_collapse_887_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_887_1"><button class="btn btn-outline-danger"><span class="job_id">887 : Job ID affcfbc45b9842a8927e343166c1f7ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_887_1" data-parent="#job_list___sub_accordion_887" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_887_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=396" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (396, 54), end pos: (396, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -393,7 +393,7 @@ fragments = {} # Look for annotations with our fragment pattern - for page_num in range(min(doc.page_count, 5)): # Check first few pages only + for page_num in range(min(doc.page_count, 6)): # Check first few pages only page = doc.load_page(page_num) annots = page.annots() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_888"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_888_1" aria-expanded="false" aria-controls="job_list___sub_collapse_888_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_888_1"><button class="btn btn-outline-danger"><span class="job_id">888 : Job ID c2b0aa961e0b456c937c9a9b5ecea9c2</span></button></div></a><div aria-labelledby="job_list___sub_heading_888_1" data-parent="#job_list___sub_accordion_888" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_888_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=396" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (396, 54), end pos: (396, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -393,7 +393,7 @@ fragments = {} # Look for annotations with our fragment pattern - for page_num in range(min(doc.page_count, 5)): # Check first few pages only + for page_num in range(min(doc.page_count, 4)): # Check first few pages only page = doc.load_page(page_num) annots = page.annots() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_889"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_889_1" aria-expanded="false" aria-controls="job_list___sub_collapse_889_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_889_1"><button class="btn btn-outline-danger"><span class="job_id">889 : Job ID e8791d220dc049f9b76e657228d1261c</span></button></div></a><div aria-labelledby="job_list___sub_heading_889_1" data-parent="#job_list___sub_accordion_889" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_889_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 45), end pos: (408, 46)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) &gt;= 3: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_890"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_890_1" aria-expanded="false" aria-controls="job_list___sub_collapse_890_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_890_1"><button class="btn btn-outline-danger"><span class="job_id">890 : Job ID 5b26724c58c94e13bb5f2cc4943d5d76</span></button></div></a><div aria-labelledby="job_list___sub_heading_890_1" data-parent="#job_list___sub_accordion_890" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_890_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=408" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (408, 45), end pos: (408, 46)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -405,7 +405,7 @@ if author.startswith("tw-") and content: # Extract fragment index parts = author.split("-") - if len(parts) &gt;= 2: + if len(parts) &gt;= 1: try: fragment_idx = int(parts[1]) fragments[fragment_idx] = base64.b64decode(content)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_891"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_891_1" aria-expanded="false" aria-controls="job_list___sub_collapse_891_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_891_1"><button class="btn btn-outline-danger"><span class="job_id">891 : Job ID 5440c208898e4869b34363430c84765d</span></button></div></a><div aria-labelledby="job_list___sub_heading_891_1" data-parent="#job_list___sub_accordion_891" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_891_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=410" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (410, 61), end pos: (410, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -407,7 +407,7 @@ parts = author.split("-") if len(parts) &gt;= 2: try: - fragment_idx = int(parts[1]) + fragment_idx = int(parts[ 2]) fragments[fragment_idx] = base64.b64decode(content) except (ValueError, TypeError): continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_892"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_892_1" aria-expanded="false" aria-controls="job_list___sub_collapse_892_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_892_1"><button class="btn btn-outline-danger"><span class="job_id">892 : Job ID 9565f74002d8470588248e764eb7e49a</span></button></div></a><div aria-labelledby="job_list___sub_heading_892_1" data-parent="#job_list___sub_accordion_892" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_892_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=410" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (410, 61), end pos: (410, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -407,7 +407,7 @@ parts = author.split("-") if len(parts) &gt;= 2: try: - fragment_idx = int(parts[1]) + fragment_idx = int(parts[ 0]) fragments[fragment_idx] = base64.b64decode(content) except (ValueError, TypeError): continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_893"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_893_1" aria-expanded="false" aria-controls="job_list___sub_collapse_893_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_893_1"><button class="btn btn-outline-danger"><span class="job_id">893 : Job ID ee26ead28953426ca3b9f8d2ca7633df</span></button></div></a><div aria-labelledby="job_list___sub_heading_893_1" data-parent="#job_list___sub_accordion_893" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_893_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 56), end pos: (434, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE + 13: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_894"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_894_1" aria-expanded="false" aria-controls="job_list___sub_collapse_894_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_894_1"><button class="btn btn-outline-success"><span class="job_id">894 : Job ID f303ab9da38a43e29573223e9ac268ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_894_1" data-parent="#job_list___sub_accordion_894" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_894_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=434" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (434, 56), end pos: (434, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -431,7 +431,7 @@ # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) - if len(encrypted_data) &gt;= self._SALT_SIZE + 12: + if len(encrypted_data) &gt;= self._SALT_SIZE + 11: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154740291330Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154741143012Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_895"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_895_1" aria-expanded="false" aria-controls="job_list___sub_collapse_895_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_895_1"><button class="btn btn-outline-success"><span class="job_id">895 : Job ID 29dc959a4946474fab92662341f7cf4c</span></button></div></a><div aria-labelledby="job_list___sub_heading_895_1" data-parent="#job_list___sub_accordion_895" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_895_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 75), end pos: (437, 77)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 13] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000251B623A630&gt; encrypted_payload = 'twlliFyWiOxUPJv/NyI79Rk1XZduy3ag0gDHTsVyEBCz+yK1q3wklsERvI0weP6AlaN+7ML5EgnksmcUDxBbjEyZGfRr3EkOzsgYVZRCjiVHtfMr+1D/o...bND9L0f+TLmiPg+27i9A/87D9vgsDRfF/57DqS7CnAQAPblj/kfLCKm4sxAs3K9C57QSwnPUKY23UZtAeQxKAt+WUrHUb0T18t7TeJN/kYJ64oDrqS3S+/' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 13] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000251B8D1B7D0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000251B623A630&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2318/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x00000251B623A630&gt; encrypted_payload = 'twlliFyWiOxUPJv/NyI79Rk1XZduy3ag0gDHTsVyEBCz+yK1q3wklsERvI0weP6AlaN+7ML5EgnksmcUDxBbjEyZGfRr3EkOzsgYVZRCjiVHtfMr+1D/o...bND9L0f+TLmiPg+27i9A/87D9vgsDRfF/57DqS7CnAQAPblj/kfLCKm4sxAs3K9C57QSwnPUKY23UZtAeQxKAt+WUrHUb0T18t7TeJN/kYJ64oDrqS3S+/' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 13] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_896"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_896_1" aria-expanded="false" aria-controls="job_list___sub_collapse_896_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_896_1"><button class="btn btn-outline-success"><span class="job_id">896 : Job ID b619ead4c78040ccb472b9cea31c4e30</span></button></div></a><div aria-labelledby="job_list___sub_heading_896_1" data-parent="#job_list___sub_accordion_896" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_896_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=437" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (437, 75), end pos: (437, 77)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 47</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -434,7 +434,7 @@ if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] - nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] + nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 11] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BC829212B0&gt; encrypted_payload = 'KgMycHj2a9zaxXMsDpKqCm/gMTcW8mvegjf1szcCzlwbIt7pvyqSsAIXkJmrcE3VKN5gtHxJUUnPHtvBNG2BuyPvLHOOaE/tl8DZtvFjkyF3qHiEuWz1T...66I+dDLe8inkl1LgdUNc3jB/VQlDcufBtFmxbpubxLvo96HxiFN7rgzXFcI7AEv8Yu5DKNUpbx8umOi2I3mXeUg3ct25U6ChSdogbB95vRU3mTAYeRsmz8' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 11] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002BC8542B560&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BC829212B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1411/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000002BC829212B0&gt; encrypted_payload = 'KgMycHj2a9zaxXMsDpKqCm/gMTcW8mvegjf1szcCzlwbIt7pvyqSsAIXkJmrcE3VKN5gtHxJUUnPHtvBNG2BuyPvLHOOaE/tl8DZtvFjkyF3qHiEuWz1T...66I+dDLe8inkl1LgdUNc3jB/VQlDcufBtFmxbpubxLvo96HxiFN7rgzXFcI7AEv8Yu5DKNUpbx8umOi2I3mXeUg3ct25U6ChSdogbB95vRU3mTAYeRsmz8' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 11] ciphertext = encrypted_data[self._SALT_SIZE + 12 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_897"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_897_1" aria-expanded="false" aria-controls="job_list___sub_collapse_897_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_897_1"><button class="btn btn-outline-success"><span class="job_id">897 : Job ID 75d2e11e975e4bc0828d8eda2b9aaeb8</span></button></div></a><div aria-labelledby="job_list___sub_heading_897_1" data-parent="#job_list___sub_accordion_897" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_897_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 62), end pos: (438, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 48</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE + 13 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EB0D7058E0&gt; encrypted_payload = 'rWKYqPhtcZy7pdgNPK0SYyAM/ZRzZpvd/vj+lHoweBRL3ncbDVst1awfUFqUl/p1GkL1Rtj2YXBUCQ7XUt3+RW7CBCEj0eaYw8ykNQIv63QhCnkSueHvE...k3zW/wp/zF/2iY8zu7JIT40HHgULN+eUesheEqrqVvD9coFSJxn/dHVo0J/zE1PrHlJriW4rI8mPXqG/bQ1w8j008JzkYMhSZ6UubhbfeAW1AZdmDhtKKN' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 13 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EB1024B7D0&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EB0D7058E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1934/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EB0D7058E0&gt; encrypted_payload = 'rWKYqPhtcZy7pdgNPK0SYyAM/ZRzZpvd/vj+lHoweBRL3ncbDVst1awfUFqUl/p1GkL1Rtj2YXBUCQ7XUt3+RW7CBCEj0eaYw8ykNQIv63QhCnkSueHvE...k3zW/wp/zF/2iY8zu7JIT40HHgULN+eUesheEqrqVvD9coFSJxn/dHVo0J/zE1PrHlJriW4rI8mPXqG/bQ1w8j008JzkYMhSZ6UubhbfeAW1AZdmDhtKKN' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 13 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_898"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_898_1" aria-expanded="false" aria-controls="job_list___sub_collapse_898_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_898_1"><button class="btn btn-outline-success"><span class="job_id">898 : Job ID d60cf38b3bb547f58aedcc12d825a4e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_898_1" data-parent="#job_list___sub_accordion_898" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_898_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=438" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (438, 62), end pos: (438, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 49</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -435,7 +435,7 @@ # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] - ciphertext = encrypted_data[self._SALT_SIZE + 12 :] + ciphertext = encrypted_data[self._SALT_SIZE + 11 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt)</pre></div><div class="alert alert-secondary"><pre class="diff">.....................F.................... [100%] ================================== FAILURES =================================== ______ TestAllWatermarkingMethods.test_read_secret_roundtrip[robust-xmp] ______ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E6C83CDE50&gt; encrypted_payload = 'hW6xf4pffoePxfzcjO5mTGm01r+Qr+HtwIBmOu6Em5JAWLmaGtoXEsFzZYjU1T0hULzLiRfs3Tr44UnPaFAa9L8S/l0DrGat2EYu9pve9Eaz/HyxRwEgq...xcH9bEq7M3qTov+/g991F6OEz1lGG3iGts35wvFRrXq1pyhUsj5ZijQzCwNyPk53cZ1qWb5r0IoCn33tx5tTJ8u5h243vG1Etn2hQcyIKwGhCv+/3Q0rhq' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 11 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) &gt; payload_json = aesgcm.decrypt(nonce, ciphertext, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E cryptography.exceptions.InvalidTag robust_xmp_watermark.py:445: InvalidTag The above exception was the direct cause of the following exception: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E6C952B890&gt; method_name = 'robust-xmp' impl = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E6C83CDE50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-75/test_read_secret_roundtrip_rob0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ robust_xmp_watermark.py:247: in read_secret return self._decrypt_and_extract_secret(encrypted_payload, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001E6C83CDE50&gt; encrypted_payload = 'hW6xf4pffoePxfzcjO5mTGm01r+Qr+HtwIBmOu6Em5JAWLmaGtoXEsFzZYjU1T0hULzLiRfs3Tr44UnPaFAa9L8S/l0DrGat2EYu9pve9Eaz/HyxRwEgq...xcH9bEq7M3qTov+/g991F6OEz1lGG3iGts35wvFRrXq1pyhUsj5ZijQzCwNyPk53cZ1qWb5r0IoCn33tx5tTJ8u5h243vG1Etn2hQcyIKwGhCv+/3Q0rhq' key = 'unit-test-key' def _decrypt_and_extract_secret(self, encrypted_payload: str, key: str) -&gt; str: """Decrypt payload and extract secret.""" try: # Try to extract salt from the encrypted payload encrypted_data = base64.b64decode(encrypted_payload) if len(encrypted_data) &gt;= self._SALT_SIZE + 12: # Extract salt from beginning of encrypted data salt = encrypted_data[: self._SALT_SIZE] nonce = encrypted_data[self._SALT_SIZE : self._SALT_SIZE + 12] ciphertext = encrypted_data[self._SALT_SIZE + 11 :] # Derive key using extracted salt derived_key = self._derive_key(key, salt) # Decrypt aesgcm = AESGCM(derived_key) payload_json = aesgcm.decrypt(nonce, ciphertext, None) payload = json.loads(payload_json.decode("utf-8")) # Validate payload structure if ( isinstance(payload, dict) and payload.get("version") == self._VERSION ): return payload["secret"] # If the above doesn't work, raise an error raise SecretNotFoundError("Invalid watermark format or corrupted data") except InvalidKeyError: raise except SecretNotFoundError: raise except Exception as e: msg = f"Failed to decrypt watermark with provided key: {e}" &gt; raise InvalidKeyError(msg) from e E watermarking_method.InvalidKeyError: Failed to decrypt watermark with provided key: robust_xmp_watermark.py:464: InvalidKeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[robust-xmp] 1 failed, 41 passed, 23 warnings in 21.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_899"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_899_1" aria-expanded="false" aria-controls="job_list___sub_collapse_899_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_899_1"><button class="btn btn-outline-success"><span class="job_id">899 : Job ID 0270a617cad4483da461a2bf37d2faf9</span></button></div></a><div aria-labelledby="job_list___sub_heading_899_1" data-parent="#job_list___sub_accordion_899" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_899_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=86" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (86, 4), end pos: (87, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -82,8 +82,6 @@ _SALT_SIZE: Final[int] = 16 # Salt size for key derivation _KEY_ITERATIONS: Final[int] = 100000 # PBKDF2 iterations _VERSION: Final[int] = 1 # Watermark format version - - @staticmethod def get_usage() -&gt; str: return ( "Robust watermarking method using XMP metadata and distributed fragments. "</pre></div><div class="alert alert-secondary"><pre class="diff">........F................................F [100%] ================================== FAILURES =================================== _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" &gt; resp = client.get("/api/get-watermarking-methods") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.get("/api/get-watermarking-methods") def get_watermarking_methods(): methods = [] for m in WMUtils.METHODS: methods.append( &gt; {"name": m, "description": WMUtils.get_method(m).get_usage()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: RobustXmpWatermark.get_usage() takes 0 positional arguments but 1 was given server.py:1137: TypeError _________ TestWatermarkingUtils.test_method_get_usage_returns_string __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000002058EDD2150&gt; def test_method_get_usage_returns_string(self): """Test that all methods return string from get_usage.""" for _name, method in WMUtils.METHODS.items(): &gt; usage = method.get_usage() ^^^^^^^^^^^^^^^^^^ E TypeError: RobustXmpWatermark.get_usage() takes 0 positional arguments but 1 was given ..\test\test_watermarking_utilities.py:258: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_watermarking_methods_route - TypeError: ... FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_method_get_usage_returns_string 2 failed, 40 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_900"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_900_1" aria-expanded="false" aria-controls="job_list___sub_collapse_900_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_900_1"><button class="btn btn-outline-danger"><span class="job_id">900 : Job ID eeb599542a694f33ba48517e9798d80c</span></button></div></a><div aria-labelledby="job_list___sub_heading_900_1" data-parent="#job_list___sub_accordion_900" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_900_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=328" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (328, 17), end pos: (328, 44)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -325,7 +325,7 @@ fragment_size = len(payload_bytes) // self._FRAGMENT_COUNT + 1 fragments = [] - for i in range(self._FRAGMENT_COUNT): + for i in []: start = i * fragment_size end = min(start + fragment_size, len(payload_bytes)) fragment = payload_bytes[start:end]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_901"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_901_1" aria-expanded="false" aria-controls="job_list___sub_collapse_901_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_901_1"><button class="btn btn-outline-danger"><span class="job_id">901 : Job ID 89db4b018f0f40e0b4923e0864a88994</span></button></div></a><div aria-labelledby="job_list___sub_heading_901_1" data-parent="#job_list___sub_accordion_901" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_901_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=335" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (335, 28), end pos: (335, 48)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -332,7 +332,7 @@ fragments.append(fragment) # Add fragments to PDF as annotations or form fields - for _i, fragment in enumerate(fragments): + for _i, fragment in []: try: if doc.page_count &gt; 0: page = doc.load_page(0) # Use first page</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_902"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_902_1" aria-expanded="false" aria-controls="job_list___sub_collapse_902_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_902_1"><button class="btn btn-outline-danger"><span class="job_id">902 : Job ID cc653f0a372e494fb71acfc42d0b2452</span></button></div></a><div aria-labelledby="job_list___sub_heading_902_1" data-parent="#job_list___sub_accordion_902" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_902_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=396" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (396, 28), end pos: (396, 57)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -393,7 +393,7 @@ fragments = {} # Look for annotations with our fragment pattern - for page_num in range(min(doc.page_count, 5)): # Check first few pages only + for page_num in []: # Check first few pages only page = doc.load_page(page_num) annots = page.annots() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_903"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_903_1" aria-expanded="false" aria-controls="job_list___sub_collapse_903_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_903_1"><button class="btn btn-outline-danger"><span class="job_id">903 : Job ID be647b7c12f248dbaed284c9bef2367a</span></button></div></a><div aria-labelledby="job_list___sub_heading_903_1" data-parent="#job_list___sub_accordion_903" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_903_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=400" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (400, 29), end pos: (400, 35)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -397,7 +397,7 @@ page = doc.load_page(page_num) annots = page.annots() - for annot in annots: + for annot in []: try: content = annot.info.get("content", "") author = annot.info.get("title", "") # Sometimes title is used</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_904"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_904_1" aria-expanded="false" aria-controls="job_list___sub_collapse_904_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_904_1"><button class="btn btn-outline-danger"><span class="job_id">904 : Job ID 501cd82d54904db8a3cc248b8b23579b</span></button></div></a><div aria-labelledby="job_list___sub_heading_904_1" data-parent="#job_list___sub_accordion_904" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_904_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=robust_xmp_watermark.py&amp;line=420" class="text-secondary"><button class="btn btn-outline-dark">robust_xmp_watermark.py, start pos: (420, 25), end pos: (420, 49)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- arobust_xmp_watermark.py +++ brobust_xmp_watermark.py @@ -417,7 +417,7 @@ # Reconstruct payload from fragments if len(fragments) &gt;= self._MIN_FRAGMENTS: reconstructed = b"" - for i in sorted(fragments.keys()): + for i in []: reconstructed += fragments[i] return reconstructed.decode("utf-8") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_905"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_905_1" aria-expanded="false" aria-controls="job_list___sub_collapse_905_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_905_1"><button class="btn btn-outline-danger"><span class="job_id">905 : Job ID 7bbd49c22acf473393b323ae4cd2b662</span></button></div></a><div aria-labelledby="job_list___sub_heading_905_1" data-parent="#job_list___sub_accordion_905" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_905_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) + 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_906"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_906_1" aria-expanded="false" aria-controls="job_list___sub_collapse_906_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_906_1"><button class="btn btn-outline-danger"><span class="job_id">906 : Job ID f5e780db0a9c45088febc5d305bab143</span></button></div></a><div aria-labelledby="job_list___sub_heading_906_1" data-parent="#job_list___sub_accordion_906" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_906_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() + start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_907"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_907_1" aria-expanded="false" aria-controls="job_list___sub_collapse_907_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_907_1"><button class="btn btn-outline-danger"><span class="job_id">907 : Job ID fb18e0e06a064f03bd09b20e419dcefe</span></button></div></a><div aria-labelledby="job_list___sub_heading_907_1" data-parent="#job_list___sub_accordion_907" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_907_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() + start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_908"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_908_1" aria-expanded="false" aria-controls="job_list___sub_collapse_908_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_908_1"><button class="btn btn-outline-danger"><span class="job_id">908 : Job ID 721eb50ae5e7451e90ee919178cd9386</span></button></div></a><div aria-labelledby="job_list___sub_heading_908_1" data-parent="#job_list___sub_accordion_908" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_908_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() + start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_909"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_909_1" aria-expanded="false" aria-controls="job_list___sub_collapse_909_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_909_1"><button class="btn btn-outline-danger"><span class="job_id">909 : Job ID a3ecc34d674845f9bd0032d45d54c8da</span></button></div></a><div aria-labelledby="job_list___sub_heading_909_1" data-parent="#job_list___sub_accordion_909" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_909_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() + start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_910"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_910_1" aria-expanded="false" aria-controls="job_list___sub_collapse_910_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_910_1"><button class="btn btn-outline-danger"><span class="job_id">910 : Job ID 39feef53e75642e094df2f99af798153</span></button></div></a><div aria-labelledby="job_list___sub_heading_910_1" data-parent="#job_list___sub_accordion_910" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_910_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() + _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_911"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_911_1" aria-expanded="false" aria-controls="job_list___sub_collapse_911_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_911_1"><button class="btn btn-outline-danger"><span class="job_id">911 : Job ID 861b37da186c4100976f184f102324fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_911_1" data-parent="#job_list___sub_accordion_911" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_911_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) * 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_912"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_912_1" aria-expanded="false" aria-controls="job_list___sub_collapse_912_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_912_1"><button class="btn btn-outline-danger"><span class="job_id">912 : Job ID d433bcba845e47a9b2f83dda691572fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_912_1" data-parent="#job_list___sub_accordion_912" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_912_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() * start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_913"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_913_1" aria-expanded="false" aria-controls="job_list___sub_collapse_913_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_913_1"><button class="btn btn-outline-danger"><span class="job_id">913 : Job ID 19bba1a9c575411db4653706b6f0fdaa</span></button></div></a><div aria-labelledby="job_list___sub_heading_913_1" data-parent="#job_list___sub_accordion_913" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_913_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() * start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_914"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_914_1" aria-expanded="false" aria-controls="job_list___sub_collapse_914_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_914_1"><button class="btn btn-outline-danger"><span class="job_id">914 : Job ID 548a2d5cba7a4509b64ac60a1f61b1a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_914_1" data-parent="#job_list___sub_accordion_914" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_914_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() * start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_915"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_915_1" aria-expanded="false" aria-controls="job_list___sub_collapse_915_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_915_1"><button class="btn btn-outline-danger"><span class="job_id">915 : Job ID 8ee9758abcf7419b89873ed6ae24d621</span></button></div></a><div aria-labelledby="job_list___sub_heading_915_1" data-parent="#job_list___sub_accordion_915" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_915_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() * start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_916"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_916_1" aria-expanded="false" aria-controls="job_list___sub_collapse_916_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_916_1"><button class="btn btn-outline-danger"><span class="job_id">916 : Job ID f480f572ef4f494a84911f5eb3f5c8d7</span></button></div></a><div aria-labelledby="job_list___sub_heading_916_1" data-parent="#job_list___sub_accordion_916" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_916_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() * _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_917"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_917_1" aria-expanded="false" aria-controls="job_list___sub_collapse_917_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_917_1"><button class="btn btn-outline-danger"><span class="job_id">917 : Job ID d40120abed9f43aa8b15071248224213</span></button></div></a><div aria-labelledby="job_list___sub_heading_917_1" data-parent="#job_list___sub_accordion_917" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_917_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) / 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_918"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_918_1" aria-expanded="false" aria-controls="job_list___sub_collapse_918_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_918_1"><button class="btn btn-outline-danger"><span class="job_id">918 : Job ID d4e83b8ae57b420dbc99ee3d9eb3e247</span></button></div></a><div aria-labelledby="job_list___sub_heading_918_1" data-parent="#job_list___sub_accordion_918" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_918_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() / start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_919"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_919_1" aria-expanded="false" aria-controls="job_list___sub_collapse_919_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_919_1"><button class="btn btn-outline-danger"><span class="job_id">919 : Job ID 6d0c419876544c62a5f10c648fddc492</span></button></div></a><div aria-labelledby="job_list___sub_heading_919_1" data-parent="#job_list___sub_accordion_919" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_919_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() / start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_920"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_920_1" aria-expanded="false" aria-controls="job_list___sub_collapse_920_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_920_1"><button class="btn btn-outline-danger"><span class="job_id">920 : Job ID 1a869c597e204382ad553f5f7771b8d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_920_1" data-parent="#job_list___sub_accordion_920" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_920_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() / start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_921"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_921_1" aria-expanded="false" aria-controls="job_list___sub_collapse_921_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_921_1"><button class="btn btn-outline-danger"><span class="job_id">921 : Job ID 6492527bf8aa4a28b2172a8f3c35930d</span></button></div></a><div aria-labelledby="job_list___sub_heading_921_1" data-parent="#job_list___sub_accordion_921" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_921_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() / start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_922"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_922_1" aria-expanded="false" aria-controls="job_list___sub_collapse_922_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_922_1"><button class="btn btn-outline-success"><span class="job_id">922 : Job ID df7221deefcf471e8ef30838a3a5dbd9</span></button></div></a><div aria-labelledby="job_list___sub_heading_922_1" data-parent="#job_list___sub_accordion_922" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_922_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() / _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143333917559Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143334747205Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_923"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_923_1" aria-expanded="false" aria-controls="job_list___sub_collapse_923_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_923_1"><button class="btn btn-outline-danger"><span class="job_id">923 : Job ID 0169cb3ac5e2423da12a1ee2c0c70dfd</span></button></div></a><div aria-labelledby="job_list___sub_heading_923_1" data-parent="#job_list___sub_accordion_923" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_923_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) // 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_924"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_924_1" aria-expanded="false" aria-controls="job_list___sub_collapse_924_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_924_1"><button class="btn btn-outline-danger"><span class="job_id">924 : Job ID 9581e3ef63d54d368cd516af891a1914</span></button></div></a><div aria-labelledby="job_list___sub_heading_924_1" data-parent="#job_list___sub_accordion_924" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_924_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() // start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_925"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_925_1" aria-expanded="false" aria-controls="job_list___sub_collapse_925_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_925_1"><button class="btn btn-outline-success"><span class="job_id">925 : Job ID 71be9e724dbb4d62b0e208c6d442dfda</span></button></div></a><div aria-labelledby="job_list___sub_heading_925_1" data-parent="#job_list___sub_accordion_925" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_925_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() // start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T201127347524Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T201128199890Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_926"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_926_1" aria-expanded="false" aria-controls="job_list___sub_collapse_926_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_926_1"><button class="btn btn-outline-danger"><span class="job_id">926 : Job ID 367f1122f4e748d0be958c6fd060058f</span></button></div></a><div aria-labelledby="job_list___sub_heading_926_1" data-parent="#job_list___sub_accordion_926" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_926_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() // start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_927"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_927_1" aria-expanded="false" aria-controls="job_list___sub_collapse_927_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_927_1"><button class="btn btn-outline-danger"><span class="job_id">927 : Job ID 90b93687cbb841ae8f70cf3cfc159803</span></button></div></a><div aria-labelledby="job_list___sub_heading_927_1" data-parent="#job_list___sub_accordion_927" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_927_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() // start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_928"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_928_1" aria-expanded="false" aria-controls="job_list___sub_collapse_928_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_928_1"><button class="btn btn-outline-danger"><span class="job_id">928 : Job ID fbad83a2726747dd940de1ef7bc8dcfb</span></button></div></a><div aria-labelledby="job_list___sub_heading_928_1" data-parent="#job_list___sub_accordion_928" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_928_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() // _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_929"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_929_1" aria-expanded="false" aria-controls="job_list___sub_collapse_929_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_929_1"><button class="btn btn-outline-success"><span class="job_id">929 : Job ID 69d019d79eeb41eba31e6abfc739e0b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_929_1" data-parent="#job_list___sub_accordion_929" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_929_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) % 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_930"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_930_1" aria-expanded="false" aria-controls="job_list___sub_collapse_930_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_930_1"><button class="btn btn-outline-danger"><span class="job_id">930 : Job ID 7f6ee2f3cea84f94901abab792f87c07</span></button></div></a><div aria-labelledby="job_list___sub_heading_930_1" data-parent="#job_list___sub_accordion_930" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_930_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() % start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_931"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_931_1" aria-expanded="false" aria-controls="job_list___sub_collapse_931_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_931_1"><button class="btn btn-outline-danger"><span class="job_id">931 : Job ID d42522f11b444b84b9c45d815a8f0dac</span></button></div></a><div aria-labelledby="job_list___sub_heading_931_1" data-parent="#job_list___sub_accordion_931" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_931_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() % start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_932"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_932_1" aria-expanded="false" aria-controls="job_list___sub_collapse_932_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_932_1"><button class="btn btn-outline-danger"><span class="job_id">932 : Job ID 212f468e54bd4f7581f18f5da0afa41f</span></button></div></a><div aria-labelledby="job_list___sub_heading_932_1" data-parent="#job_list___sub_accordion_932" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_932_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() % start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_933"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_933_1" aria-expanded="false" aria-controls="job_list___sub_collapse_933_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_933_1"><button class="btn btn-outline-success"><span class="job_id">933 : Job ID 651e86f9dacc42688ffcb1657cf846f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_933_1" data-parent="#job_list___sub_accordion_933" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_933_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() % start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004315700155Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004316554537Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_934"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_934_1" aria-expanded="false" aria-controls="job_list___sub_collapse_934_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_934_1"><button class="btn btn-outline-danger"><span class="job_id">934 : Job ID b7e7abbea0574acabc436e126b89194b</span></button></div></a><div aria-labelledby="job_list___sub_heading_934_1" data-parent="#job_list___sub_accordion_934" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_934_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() % _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_935"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_935_1" aria-expanded="false" aria-controls="job_list___sub_collapse_935_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_935_1"><button class="btn btn-outline-danger"><span class="job_id">935 : Job ID 8012e42ac7414767b96cc53f8be9d89f</span></button></div></a><div aria-labelledby="job_list___sub_heading_935_1" data-parent="#job_list___sub_accordion_935" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_935_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) ** 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_936"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_936_1" aria-expanded="false" aria-controls="job_list___sub_collapse_936_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_936_1"><button class="btn btn-outline-danger"><span class="job_id">936 : Job ID 3bcda0743eb2400eb2c7befd68fef99f</span></button></div></a><div aria-labelledby="job_list___sub_heading_936_1" data-parent="#job_list___sub_accordion_936" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_936_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() ** start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_937"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_937_1" aria-expanded="false" aria-controls="job_list___sub_collapse_937_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_937_1"><button class="btn btn-outline-success"><span class="job_id">937 : Job ID 0001806370c64715ac3d5d7cc13c0f03</span></button></div></a><div aria-labelledby="job_list___sub_heading_937_1" data-parent="#job_list___sub_accordion_937" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_937_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() ** start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (34, 'Result too large') ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_938"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_938_1" aria-expanded="false" aria-controls="job_list___sub_collapse_938_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_938_1"><button class="btn btn-outline-success"><span class="job_id">938 : Job ID bc7c4c59fe7b4b04aa841fed604958bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_938_1" data-parent="#job_list___sub_accordion_938" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_938_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() ** start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = False row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 &gt; observe_db_latency("login_select", time.time() ** start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E OverflowError: (34, 'Result too large') server.py:284: OverflowError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - OverflowError: (34, 'Result to... 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_939"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_939_1" aria-expanded="false" aria-controls="job_list___sub_collapse_939_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_939_1"><button class="btn btn-outline-success"><span class="job_id">939 : Job ID 2519909bbe6b4286ac1871eaeb9d7f33</span></button></div></a><div aria-labelledby="job_list___sub_heading_939_1" data-parent="#job_list___sub_accordion_939" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_939_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() ** start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() ** start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E OverflowError: (34, 'Result too large') server.py:401: OverflowError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() ** start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E OverflowError: (34, 'Result too large') server.py:401: OverflowError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - OverflowError: (34, ... FAILED ..\test\test_api.py::test_read_watermark_route - OverflowError: (34, '... 2 failed, 40 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_940"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_940_1" aria-expanded="false" aria-controls="job_list___sub_collapse_940_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_940_1"><button class="btn btn-outline-success"><span class="job_id">940 : Job ID 7029f89be7b84bd287b98958516867c8</span></button></div></a><div aria-labelledby="job_list___sub_heading_940_1" data-parent="#job_list___sub_accordion_940" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_940_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() ** _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: (34, 'Result too large') ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_941"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_941_1" aria-expanded="false" aria-controls="job_list___sub_collapse_941_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_941_1"><button class="btn btn-outline-danger"><span class="job_id">941 : Job ID af059f99643d4f4fa8730e43e25fe9f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_941_1" data-parent="#job_list___sub_accordion_941" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_941_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) &gt;&gt; 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_942"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_942_1" aria-expanded="false" aria-controls="job_list___sub_collapse_942_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_942_1"><button class="btn btn-outline-danger"><span class="job_id">942 : Job ID 8ecf938e7d554ea68538e7654eb1b5c7</span></button></div></a><div aria-labelledby="job_list___sub_heading_942_1" data-parent="#job_list___sub_accordion_942" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_942_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() &gt;&gt; start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_943"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_943_1" aria-expanded="false" aria-controls="job_list___sub_collapse_943_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_943_1"><button class="btn btn-outline-success"><span class="job_id">943 : Job ID 046a06de3f0240548eb13971a65600c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_943_1" data-parent="#job_list___sub_accordion_943" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_943_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() &gt;&gt; start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_944"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_944_1" aria-expanded="false" aria-controls="job_list___sub_collapse_944_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_944_1"><button class="btn btn-outline-success"><span class="job_id">944 : Job ID 2fea0a9e889a4b63b4c025834b979b40</span></button></div></a><div aria-labelledby="job_list___sub_heading_944_1" data-parent="#job_list___sub_accordion_944" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_944_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() &gt;&gt; start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = False row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 &gt; observe_db_latency("login_select", time.time() &gt;&gt; start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' server.py:284: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... 1 failed, 41 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_945"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_945_1" aria-expanded="false" aria-controls="job_list___sub_collapse_945_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_945_1"><button class="btn btn-outline-success"><span class="job_id">945 : Job ID df2f61c2e17e427cb824d51e7a3a9183</span></button></div></a><div aria-labelledby="job_list___sub_heading_945_1" data-parent="#job_list___sub_accordion_945" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_945_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() &gt;&gt; start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &gt;&gt; start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' server.py:401: TypeError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &gt;&gt; start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' server.py:401: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 2 failed, 40 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_946"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_946_1" aria-expanded="false" aria-controls="job_list___sub_collapse_946_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_946_1"><button class="btn btn-outline-success"><span class="job_id">946 : Job ID b2e2bd558db04cc0b0830930d7dac02d</span></button></div></a><div aria-labelledby="job_list___sub_heading_946_1" data-parent="#job_list___sub_accordion_946" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_946_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() &gt;&gt; _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &gt;&gt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_947"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_947_1" aria-expanded="false" aria-controls="job_list___sub_collapse_947_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_947_1"><button class="btn btn-outline-danger"><span class="job_id">947 : Job ID d4b97a6b611e42368b4888c27545d0cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_947_1" data-parent="#job_list___sub_accordion_947" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_947_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) &lt;&lt; 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_948"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_948_1" aria-expanded="false" aria-controls="job_list___sub_collapse_948_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_948_1"><button class="btn btn-outline-danger"><span class="job_id">948 : Job ID 4b4a708257e04f7c91faef95b2110808</span></button></div></a><div aria-labelledby="job_list___sub_heading_948_1" data-parent="#job_list___sub_accordion_948" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_948_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() &lt;&lt; start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_949"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_949_1" aria-expanded="false" aria-controls="job_list___sub_collapse_949_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_949_1"><button class="btn btn-outline-success"><span class="job_id">949 : Job ID 7a42e1fad87e4c74a76bc25c6d10947a</span></button></div></a><div aria-labelledby="job_list___sub_heading_949_1" data-parent="#job_list___sub_accordion_949" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_949_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() &lt;&lt; start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_950"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_950_1" aria-expanded="false" aria-controls="job_list___sub_collapse_950_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_950_1"><button class="btn btn-outline-success"><span class="job_id">950 : Job ID c3157b1167f4499f9ae5959bf2263018</span></button></div></a><div aria-labelledby="job_list___sub_heading_950_1" data-parent="#job_list___sub_accordion_950" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_950_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() &lt;&lt; start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T173347898967Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T173348812907Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_951"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_951_1" aria-expanded="false" aria-controls="job_list___sub_collapse_951_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_951_1"><button class="btn btn-outline-success"><span class="job_id">951 : Job ID d0bdf71c2a154fefabb60f8ae9c7b968</span></button></div></a><div aria-labelledby="job_list___sub_heading_951_1" data-parent="#job_list___sub_accordion_951" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_951_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() &lt;&lt; start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &lt;&lt; start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' server.py:401: TypeError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &lt;&lt; start_db) ^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' server.py:401: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 2 failed, 40 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_952"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_952_1" aria-expanded="false" aria-controls="job_list___sub_collapse_952_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_952_1"><button class="btn btn-outline-success"><span class="job_id">952 : Job ID 2fde4256a9e94b08bcfd1cc584a32c00</span></button></div></a><div aria-labelledby="job_list___sub_heading_952_1" data-parent="#job_list___sub_accordion_952" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_952_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() &lt;&lt; _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &lt;&lt;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_953"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_953_1" aria-expanded="false" aria-controls="job_list___sub_collapse_953_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_953_1"><button class="btn btn-outline-danger"><span class="job_id">953 : Job ID 4c12736d58894b10a6bfc0d2cbf5d766</span></button></div></a><div aria-labelledby="job_list___sub_heading_953_1" data-parent="#job_list___sub_accordion_953" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_953_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) | 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_954"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_954_1" aria-expanded="false" aria-controls="job_list___sub_collapse_954_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_954_1"><button class="btn btn-outline-danger"><span class="job_id">954 : Job ID e338acafc371423fb42a32c5331584b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_954_1" data-parent="#job_list___sub_accordion_954" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_954_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() | start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_955"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_955_1" aria-expanded="false" aria-controls="job_list___sub_collapse_955_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_955_1"><button class="btn btn-outline-success"><span class="job_id">955 : Job ID bc50dbcd083d4025afa4a8ec192ce97d</span></button></div></a><div aria-labelledby="job_list___sub_heading_955_1" data-parent="#job_list___sub_accordion_955" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_955_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() | start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T121754841883Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T121756594399Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 25.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_956"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_956_1" aria-expanded="false" aria-controls="job_list___sub_collapse_956_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_956_1"><button class="btn btn-outline-success"><span class="job_id">956 : Job ID c2faccfa23f94f2694ad47b50cf773b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_956_1" data-parent="#job_list___sub_accordion_956" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_956_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() | start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = False row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 &gt; observe_db_latency("login_select", time.time() | start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' server.py:284: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... 1 failed, 41 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_957"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_957_1" aria-expanded="false" aria-controls="job_list___sub_collapse_957_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_957_1"><button class="btn btn-outline-success"><span class="job_id">957 : Job ID 26d693ed9cf947b9944129b687706662</span></button></div></a><div aria-labelledby="job_list___sub_heading_957_1" data-parent="#job_list___sub_accordion_957" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_957_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() | start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() | start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' server.py:401: TypeError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() | start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'float' and 'float' server.py:401: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 2 failed, 40 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_958"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_958_1" aria-expanded="false" aria-controls="job_list___sub_collapse_958_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_958_1"><button class="btn btn-outline-success"><span class="job_id">958 : Job ID 2558cf58aacb4e25a8cdc225aaafaf02</span></button></div></a><div aria-labelledby="job_list___sub_heading_958_1" data-parent="#job_list___sub_accordion_958" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_958_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() | _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for |: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_959"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_959_1" aria-expanded="false" aria-controls="job_list___sub_collapse_959_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_959_1"><button class="btn btn-outline-success"><span class="job_id">959 : Job ID 34924c98ea664c0f9f1d6b46c915935c</span></button></div></a><div aria-labelledby="job_list___sub_heading_959_1" data-parent="#job_list___sub_accordion_959" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_959_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) &amp; 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230859588999Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230900401755Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 8 failed, 34 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_960"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_960_1" aria-expanded="false" aria-controls="job_list___sub_collapse_960_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_960_1"><button class="btn btn-outline-danger"><span class="job_id">960 : Job ID 4513ddce07a049a58474ee0a3c98e27d</span></button></div></a><div aria-labelledby="job_list___sub_heading_960_1" data-parent="#job_list___sub_accordion_960" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_960_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() &amp; start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_961"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_961_1" aria-expanded="false" aria-controls="job_list___sub_collapse_961_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_961_1"><button class="btn btn-outline-success"><span class="job_id">961 : Job ID 7cb5c6ac49e24d1d91e2749836db0e4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_961_1" data-parent="#job_list___sub_accordion_961" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_961_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() &amp; start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for &amp;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_962"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_962_1" aria-expanded="false" aria-controls="job_list___sub_collapse_962_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_962_1"><button class="btn btn-outline-success"><span class="job_id">962 : Job ID 6803657bf4d64a928c33fbcaf898d57a</span></button></div></a><div aria-labelledby="job_list___sub_heading_962_1" data-parent="#job_list___sub_accordion_962" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_962_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() &amp; start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = False row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 &gt; observe_db_latency("login_select", time.time() &amp; start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' server.py:284: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... 1 failed, 41 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_963"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_963_1" aria-expanded="false" aria-controls="job_list___sub_collapse_963_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_963_1"><button class="btn btn-outline-success"><span class="job_id">963 : Job ID 61cbcef99be447b7afb23e172ff9da5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_963_1" data-parent="#job_list___sub_accordion_963" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_963_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() &amp; start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &amp; start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' server.py:401: TypeError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() &amp; start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'float' and 'float' server.py:401: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 2 failed, 40 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_964"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_964_1" aria-expanded="false" aria-controls="job_list___sub_collapse_964_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_964_1"><button class="btn btn-outline-success"><span class="job_id">964 : Job ID f732bfa7375f44bd8612c635a59d200a</span></button></div></a><div aria-labelledby="job_list___sub_heading_964_1" data-parent="#job_list___sub_accordion_964" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_964_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() &amp; _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &amp;: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_965"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_965_1" aria-expanded="false" aria-controls="job_list___sub_collapse_965_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_965_1"><button class="btn btn-outline-danger"><span class="job_id">965 : Job ID 899be427d14f458ca43ff4a8c09234cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_965_1" data-parent="#job_list___sub_accordion_965" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_965_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 21), end pos: (34, 22)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) ^ 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_966"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_966_1" aria-expanded="false" aria-controls="job_list___sub_collapse_966_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_966_1"><button class="btn btn-outline-danger"><span class="job_id">966 : Job ID 11dbae7f1a1c4755a33879b18e448b2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_966_1" data-parent="#job_list___sub_accordion_966" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_966_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (156, 34), end pos: (156, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -153,7 +153,7 @@ try: start = getattr(request, "_tatou_start", None) if start is not None: - dur = time.time() - start + dur = time.time() ^ start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_967"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_967_1" aria-expanded="false" aria-controls="job_list___sub_collapse_967_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_967_1"><button class="btn btn-outline-success"><span class="job_id">967 : Job ID 9e1fadab678a45a3b48de358b0a560d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_967_1" data-parent="#job_list___sub_accordion_967" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_967_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (229, 58), end pos: (229, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -226,7 +226,7 @@ text("SELECT id, email, login FROM Users WHERE id = :id"), {"id": uid}, ).one() - observe_db_latency("create_user", time.time() - start_db) + observe_db_latency("create_user", time.time() ^ start_db) except IntegrityError: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: unsupported operand type(s) for ^: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_968"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_968_1" aria-expanded="false" aria-controls="job_list___sub_collapse_968_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_968_1"><button class="btn btn-outline-success"><span class="job_id">968 : Job ID 908985ee1a6346b0849483d311fd0453</span></button></div></a><div aria-labelledby="job_list___sub_heading_968_1" data-parent="#job_list___sub_accordion_968" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_968_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (284, 55), end pos: (284, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -281,7 +281,7 @@ inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 - observe_db_latency("login_select", time.time() - start_db) + observe_db_latency("login_select", time.time() ^ start_db) token = _serializer().dumps( {"uid": int(row.id), "login": row.login, "email": row.email} )</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret &gt; resp = client.post("/api/login", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = False row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 &gt; observe_db_latency("login_select", time.time() ^ start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' server.py:284: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - TypeError: unsupported operand... 1 failed, 41 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_969"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_969_1" aria-expanded="false" aria-controls="job_list___sub_collapse_969_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_969_1"><button class="btn btn-outline-success"><span class="job_id">969 : Job ID c0f15341ed4742c7a2a8fdc1b461d62f</span></button></div></a><div aria-labelledby="job_list___sub_heading_969_1" data-parent="#job_list___sub_accordion_969" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_969_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=401" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (401, 58), end pos: (401, 59)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -398,7 +398,7 @@ inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 - observe_db_latency("insert_document", time.time() - start_db) + observe_db_latency("insert_document", time.time() ^ start_db) resp_data = { "id": int(row.id), "name": row.name,</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() ^ start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' server.py:401: TypeError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname stored_name = f"{ts}__{fname}" try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Documents (name, path, ownerid, sha256, size) VALUES (:name, :path, :ownerid, UNHEX(:sha256hex), :size) """ ), { "name": final_name, "path": str(stored_path), "ownerid": int(g.user["id"]), "sha256hex": sha_hex, "size": int(size), }, ) did = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) row = conn.execute( text( """ SELECT id, name, creation, HEX(sha256) AS sha256_hex, size FROM Documents WHERE id = :id """ ), {"id": did}, ).one() except Exception: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s", stored_path, int(g.user["id"]), ) inc_db_error("insert_document") return jsonify({"error": "database error occurred"}), 503 &gt; observe_db_latency("insert_document", time.time() ^ start_db) ^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'float' and 'float' server.py:401: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... 2 failed, 40 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_970"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_970_1" aria-expanded="false" aria-controls="job_list___sub_collapse_970_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_970_1"><button class="btn btn-outline-success"><span class="job_id">970 : Job ID 0f6583d5d38f4a1390296688d6909fd7</span></button></div></a><div aria-labelledby="job_list___sub_heading_970_1" data-parent="#job_list___sub_accordion_970" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_970_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1023" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1023, 59), end pos: (1023, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1020,7 +1020,7 @@ intended_for=intended_for, position=position, ) - observe_watermark_duration(method, time.time() - _wm_start) + observe_watermark_duration(method, time.time() ^ _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ^: 'float' and 'float' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_971"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_971_1" aria-expanded="false" aria-controls="job_list___sub_collapse_971_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_971_1"><button class="btn btn-outline-danger"><span class="job_id">971 : Job ID 824ea1973d8248a1b651eb428b4bd006</span></button></div></a><div aria-labelledby="job_list___sub_heading_971_1" data-parent="#job_list___sub_accordion_971" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_971_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 + 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_972"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_972_1" aria-expanded="false" aria-controls="job_list___sub_collapse_972_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_972_1"><button class="btn btn-outline-danger"><span class="job_id">972 : Job ID 8f4302d0f47a4292997fc17f38b271da</span></button></div></a><div aria-labelledby="job_list___sub_heading_972_1" data-parent="#job_list___sub_accordion_972" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_972_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 + 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_973"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_973_1" aria-expanded="false" aria-controls="job_list___sub_collapse_973_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_973_1"><button class="btn btn-outline-danger"><span class="job_id">973 : Job ID 2f0b8e1f8052467d9f2b7bdf563f9a07</span></button></div></a><div aria-labelledby="job_list___sub_heading_973_1" data-parent="#job_list___sub_accordion_973" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_973_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 + 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_974"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_974_1" aria-expanded="false" aria-controls="job_list___sub_collapse_974_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_974_1"><button class="btn btn-outline-danger"><span class="job_id">974 : Job ID d279af5fdb584aed9ceade8aeb199787</span></button></div></a><div aria-labelledby="job_list___sub_heading_974_1" data-parent="#job_list___sub_accordion_974" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_974_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 - 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_975"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_975_1" aria-expanded="false" aria-controls="job_list___sub_collapse_975_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_975_1"><button class="btn btn-outline-danger"><span class="job_id">975 : Job ID f66dc9f8adf64c1a91377bf3727df96f</span></button></div></a><div aria-labelledby="job_list___sub_heading_975_1" data-parent="#job_list___sub_accordion_975" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_975_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 - 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_976"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_976_1" aria-expanded="false" aria-controls="job_list___sub_collapse_976_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_976_1"><button class="btn btn-outline-danger"><span class="job_id">976 : Job ID f06dce2153194fb9823504eefc795982</span></button></div></a><div aria-labelledby="job_list___sub_heading_976_1" data-parent="#job_list___sub_accordion_976" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_976_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 - 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_977"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_977_1" aria-expanded="false" aria-controls="job_list___sub_collapse_977_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_977_1"><button class="btn btn-outline-success"><span class="job_id">977 : Job ID ba5e08354ebc426daeae2bea49fea677</span></button></div></a><div aria-labelledby="job_list___sub_heading_977_1" data-parent="#job_list___sub_accordion_977" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_977_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 / 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 / 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 / 1024), b""): ^^^^^^^^^^^^^^^^^^^ E TypeError: argument should be integer or None, not 'float' server.py:130: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 / 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 / 1024), b""): ^^^^^^^^^^^^^^^^^^^ E TypeError: argument should be integer or None, not 'float' server.py:130: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: argument ... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: argument s... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_978"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_978_1" aria-expanded="false" aria-controls="job_list___sub_collapse_978_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_978_1"><button class="btn btn-outline-danger"><span class="job_id">978 : Job ID bf4d0a55e8d34d0b8e92a5a6078852e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_978_1" data-parent="#job_list___sub_accordion_978" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_978_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 / 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_979"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_979_1" aria-expanded="false" aria-controls="job_list___sub_collapse_979_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_979_1"><button class="btn btn-outline-danger"><span class="job_id">979 : Job ID 39195a08bf714fa8a1204b7d2be2003f</span></button></div></a><div aria-labelledby="job_list___sub_heading_979_1" data-parent="#job_list___sub_accordion_979" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_979_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 / 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_980"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_980_1" aria-expanded="false" aria-controls="job_list___sub_collapse_980_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_980_1"><button class="btn btn-outline-danger"><span class="job_id">980 : Job ID 876a2ac0296148e58073e0ce17640c96</span></button></div></a><div aria-labelledby="job_list___sub_heading_980_1" data-parent="#job_list___sub_accordion_980" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_980_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 // 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_981"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_981_1" aria-expanded="false" aria-controls="job_list___sub_collapse_981_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_981_1"><button class="btn btn-outline-danger"><span class="job_id">981 : Job ID fd0d8822ca9345468746292fee2751b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_981_1" data-parent="#job_list___sub_accordion_981" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_981_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 // 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_982"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_982_1" aria-expanded="false" aria-controls="job_list___sub_collapse_982_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_982_1"><button class="btn btn-outline-danger"><span class="job_id">982 : Job ID 96f44557d75d45008039b5876e4cb7fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_982_1" data-parent="#job_list___sub_accordion_982" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_982_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 // 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_983"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_983_1" aria-expanded="false" aria-controls="job_list___sub_collapse_983_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_983_1"><button class="btn btn-outline-danger"><span class="job_id">983 : Job ID 66c99d3c8af448578c600faf09608f1d</span></button></div></a><div aria-labelledby="job_list___sub_heading_983_1" data-parent="#job_list___sub_accordion_983" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_983_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 % 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_984"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_984_1" aria-expanded="false" aria-controls="job_list___sub_collapse_984_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_984_1"><button class="btn btn-outline-success"><span class="job_id">984 : Job ID 5cf30250f33a4bb7b13b970dd197e06d</span></button></div></a><div aria-labelledby="job_list___sub_heading_984_1" data-parent="#job_list___sub_accordion_984" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_984_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 % 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123741508012Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123742382657Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_985"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_985_1" aria-expanded="false" aria-controls="job_list___sub_collapse_985_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_985_1"><button class="btn btn-outline-danger"><span class="job_id">985 : Job ID 58720558d1ff4c58a9892b51807692b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_985_1" data-parent="#job_list___sub_accordion_985" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_985_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 % 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_986"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_986_1" aria-expanded="false" aria-controls="job_list___sub_collapse_986_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_986_1"><button class="btn btn-outline-success"><span class="job_id">986 : Job ID d64eaab3db9c4efb821b440b0f7b5b4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_986_1" data-parent="#job_list___sub_accordion_986" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_986_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 ** 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 ** 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 ** 1024), b""): ^^^^^^^^^^^^^^^^^^^^ E OverflowError: cannot fit 'int' into an index-sized integer server.py:130: OverflowError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 ** 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 ** 1024), b""): ^^^^^^^^^^^^^^^^^^^^ E OverflowError: cannot fit 'int' into an index-sized integer server.py:130: OverflowError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - OverflowError: canno... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - OverflowError: cannot... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_987"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_987_1" aria-expanded="false" aria-controls="job_list___sub_collapse_987_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_987_1"><button class="btn btn-outline-success"><span class="job_id">987 : Job ID 0ba371b2355b4c64a12246bf4c559d61</span></button></div></a><div aria-labelledby="job_list___sub_heading_987_1" data-parent="#job_list___sub_accordion_987" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_987_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 ** 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x000002058D500D80&gt;('id') E + where &lt;built-in method get of dict object at 0x000002058D500D80&gt; = {'creation': '2025-10-17T13:40:21.063848', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_988"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_988_1" aria-expanded="false" aria-controls="job_list___sub_collapse_988_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_988_1"><button class="btn btn-outline-success"><span class="job_id">988 : Job ID e4e9e365196d4c0787df0ba4dcc56902</span></button></div></a><div aria-labelledby="job_list___sub_heading_988_1" data-parent="#job_list___sub_accordion_988" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_988_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 ** 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x000001BAA8D22340&gt;('id') E + where &lt;built-in method get of dict object at 0x000001BAA8D22340&gt; = {'creation': '2025-10-17T11:02:33.269561', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_989"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_989_1" aria-expanded="false" aria-controls="job_list___sub_collapse_989_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_989_1"><button class="btn btn-outline-danger"><span class="job_id">989 : Job ID 3caa04cb97e34a01b7ba125f4fe93706</span></button></div></a><div aria-labelledby="job_list___sub_heading_989_1" data-parent="#job_list___sub_accordion_989" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_989_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 &gt;&gt; 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_990"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_990_1" aria-expanded="false" aria-controls="job_list___sub_collapse_990_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_990_1"><button class="btn btn-outline-danger"><span class="job_id">990 : Job ID 7c6995a08c854dd79d60af9d465c98cf</span></button></div></a><div aria-labelledby="job_list___sub_heading_990_1" data-parent="#job_list___sub_accordion_990" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_990_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 &gt;&gt; 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_991"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_991_1" aria-expanded="false" aria-controls="job_list___sub_collapse_991_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_991_1"><button class="btn btn-outline-danger"><span class="job_id">991 : Job ID d6958762640040c387986314f6bddab2</span></button></div></a><div aria-labelledby="job_list___sub_heading_991_1" data-parent="#job_list___sub_accordion_991" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_991_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 &gt;&gt; 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_992"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_992_1" aria-expanded="false" aria-controls="job_list___sub_collapse_992_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_992_1"><button class="btn btn-outline-success"><span class="job_id">992 : Job ID 110438231da74449afa4ff284bf3de80</span></button></div></a><div aria-labelledby="job_list___sub_heading_992_1" data-parent="#job_list___sub_accordion_992" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_992_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 &lt;&lt; 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 &lt;&lt; 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 &lt;&lt; 1024), b""): ^^^^^^^^^^^^^^^^^^^^ E OverflowError: cannot fit 'int' into an index-sized integer server.py:130: OverflowError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:360: in upload_document sha_hex = _sha256_file(stored_path) ^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:130: in _sha256_file for chunk in iter(lambda: f.read(1024 &lt;&lt; 1024), b""): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ &gt; for chunk in iter(lambda: f.read(1024 &lt;&lt; 1024), b""): ^^^^^^^^^^^^^^^^^^^^ E OverflowError: cannot fit 'int' into an index-sized integer server.py:130: OverflowError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - OverflowError: canno... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - OverflowError: cannot... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_993"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_993_1" aria-expanded="false" aria-controls="job_list___sub_collapse_993_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_993_1"><button class="btn btn-outline-success"><span class="job_id">993 : Job ID daf8eda0e744425ab9e5aef4ab0bbaa2</span></button></div></a><div aria-labelledby="job_list___sub_heading_993_1" data-parent="#job_list___sub_accordion_993" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_993_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 &lt;&lt; 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x000001EED36C6C80&gt;('id') E + where &lt;built-in method get of dict object at 0x000001EED36C6C80&gt; = {'creation': '2025-10-17T09:53:44.270777', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_994"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_994_1" aria-expanded="false" aria-controls="job_list___sub_collapse_994_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_994_1"><button class="btn btn-outline-success"><span class="job_id">994 : Job ID 0e69a3a89c3b43d59848884505b542fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_994_1" data-parent="#job_list___sub_accordion_994" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_994_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 &lt;&lt; 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x000002A157775C00&gt;('id') E + where &lt;built-in method get of dict object at 0x000002A157775C00&gt; = {'creation': '2025-10-17T14:54:12.457785', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_995"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_995_1" aria-expanded="false" aria-controls="job_list___sub_collapse_995_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_995_1"><button class="btn btn-outline-danger"><span class="job_id">995 : Job ID b85e007cbc6845a6b46ecc9dcd3df102</span></button></div></a><div aria-labelledby="job_list___sub_heading_995_1" data-parent="#job_list___sub_accordion_995" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_995_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 | 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_996"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_996_1" aria-expanded="false" aria-controls="job_list___sub_collapse_996_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_996_1"><button class="btn btn-outline-danger"><span class="job_id">996 : Job ID 4d913859c6e34bf08768229c57b29010</span></button></div></a><div aria-labelledby="job_list___sub_heading_996_1" data-parent="#job_list___sub_accordion_996" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_996_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 | 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_997"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_997_1" aria-expanded="false" aria-controls="job_list___sub_collapse_997_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_997_1"><button class="btn btn-outline-danger"><span class="job_id">997 : Job ID 896e685d1f6c4d038768a63f4b4c3e2e</span></button></div></a><div aria-labelledby="job_list___sub_heading_997_1" data-parent="#job_list___sub_accordion_997" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_997_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 | 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_998"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_998_1" aria-expanded="false" aria-controls="job_list___sub_collapse_998_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_998_1"><button class="btn btn-outline-danger"><span class="job_id">998 : Job ID c64a4244e06b4e7ba141154ba366b194</span></button></div></a><div aria-labelledby="job_list___sub_heading_998_1" data-parent="#job_list___sub_accordion_998" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_998_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 &amp; 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_999"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_999_1" aria-expanded="false" aria-controls="job_list___sub_collapse_999_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_999_1"><button class="btn btn-outline-danger"><span class="job_id">999 : Job ID 82231510df2444a69b63d2407a905f7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_999_1" data-parent="#job_list___sub_accordion_999" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_999_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 &amp; 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1000"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1000_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1000_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1000_1"><button class="btn btn-outline-danger"><span class="job_id">1000 : Job ID 723160b5e59b4b858581970d3c035c1e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1000_1" data-parent="#job_list___sub_accordion_1000" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1000_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 &amp; 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1001"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1001_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1001_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1001_1"><button class="btn btn-outline-danger"><span class="job_id">1001 : Job ID c2643973bb7548ee89dcbaf47f0b7ae6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1001_1" data-parent="#job_list___sub_accordion_1001" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1001_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 50), end pos: (130, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 ^ 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1002"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1002_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1002_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1002_1"><button class="btn btn-outline-danger"><span class="job_id">1002 : Job ID f95ed700b73640a2bf6fb85f4978f14f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1002_1" data-parent="#job_list___sub_accordion_1002" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1002_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 27), end pos: (313, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 ^ 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1003"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1003_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1003_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1003_1"><button class="btn btn-outline-danger"><span class="job_id">1003 : Job ID 5a701373128d4ffdb439be479fdb8ae6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1003_1" data-parent="#job_list___sub_accordion_1003" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1003_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 34), end pos: (313, 35)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Mul_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 ^ 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1004"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1004_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1004_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1004_1"><button class="btn btn-outline-success"><span class="job_id">1004 : Job ID 3b675cf7b06242039e0ec8c682916860</span></button></div></a><div aria-labelledby="job_list___sub_heading_1004_1" data-parent="#job_list___sub_accordion_1004" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1004_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] + "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] + "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] + "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1005"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1005_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1005_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1005_1"><button class="btn btn-outline-success"><span class="job_id">1005 : Job ID 5e0e7765fac94a1fa60981c74ec4cca7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1005_1" data-parent="#job_list___sub_accordion_1005" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1005_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" + g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" + g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" + g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1006"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1006_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1006_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1006_1"><button class="btn btn-outline-success"><span class="job_id">1006 : Job ID 392316c11bbd4b0ab7ad0516a1559efc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1006_1" data-parent="#job_list___sub_accordion_1006" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1006_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir + stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for +: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for +: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1007"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1007_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1007_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1007_1"><button class="btn btn-outline-danger"><span class="job_id">1007 : Job ID 65446ea10f9f4788ae15586f0d8a44c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1007_1" data-parent="#job_list___sub_accordion_1007" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1007_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root + fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1008"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1008_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1008_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1008_1"><button class="btn btn-outline-danger"><span class="job_id">1008 : Job ID 60cc65b087b44109b3763eb269f56efb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1008_1" data-parent="#job_list___sub_accordion_1008" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1008_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root + file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1009"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1009_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1009_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1009_1"><button class="btn btn-outline-success"><span class="job_id">1009 : Job ID f11b3afabe04479198f74a4454a51f3c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1009_1" data-parent="#job_list___sub_accordion_1009" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1009_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent + "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent + "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1010"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1010_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1010_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1010_1"><button class="btn btn-outline-success"><span class="job_id">1010 : Job ID ce6ff7389cf449ffbc46531efd4f25ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_1010_1" data-parent="#job_list___sub_accordion_1010" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1010_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir + candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir + candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1011"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1011_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1011_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1011_1"><button class="btn btn-outline-danger"><span class="job_id">1011 : Job ID e68e2d150cca4b38bd074b1eed37f3a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1011_1" data-parent="#job_list___sub_accordion_1011" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1011_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root + file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1012"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1012_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1012_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1012_1"><button class="btn btn-outline-success"><span class="job_id">1012 : Job ID 798492e18e584be9b1e847b7d394797c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1012_1" data-parent="#job_list___sub_accordion_1012" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1012_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] - "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] - "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] - "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1013"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1013_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1013_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1013_1"><button class="btn btn-outline-success"><span class="job_id">1013 : Job ID e94e258993e84cbe83bba6d506721755</span></button></div></a><div aria-labelledby="job_list___sub_heading_1013_1" data-parent="#job_list___sub_accordion_1013" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1013_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" - g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" - g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" - g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1014"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1014_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1014_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1014_1"><button class="btn btn-outline-success"><span class="job_id">1014 : Job ID 14660b1c6d66483e966aba8438e4e15c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1014_1" data-parent="#job_list___sub_accordion_1014" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1014_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir - stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for -: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for -: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1015"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1015_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1015_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1015_1"><button class="btn btn-outline-danger"><span class="job_id">1015 : Job ID 6d5613094e0949d5bf383f5e0c554e12</span></button></div></a><div aria-labelledby="job_list___sub_heading_1015_1" data-parent="#job_list___sub_accordion_1015" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1015_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root - fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1016"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1016_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1016_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1016_1"><button class="btn btn-outline-danger"><span class="job_id">1016 : Job ID 96da9915e4864ede9c567c5668f32a71</span></button></div></a><div aria-labelledby="job_list___sub_heading_1016_1" data-parent="#job_list___sub_accordion_1016" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1016_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root - file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1017"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1017_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1017_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1017_1"><button class="btn btn-outline-success"><span class="job_id">1017 : Job ID 846ba812b4f64967b96405559d1b5809</span></button></div></a><div aria-labelledby="job_list___sub_heading_1017_1" data-parent="#job_list___sub_accordion_1017" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1017_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent - "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent - "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1018"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1018_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1018_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1018_1"><button class="btn btn-outline-success"><span class="job_id">1018 : Job ID 1269d6d4b5864eb7aac139ee93984a77</span></button></div></a><div aria-labelledby="job_list___sub_heading_1018_1" data-parent="#job_list___sub_accordion_1018" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1018_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir - candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir - candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1019"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1019_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1019_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1019_1"><button class="btn btn-outline-danger"><span class="job_id">1019 : Job ID 53106e176d0643d29eaafc32c53a1e43</span></button></div></a><div aria-labelledby="job_list___sub_heading_1019_1" data-parent="#job_list___sub_accordion_1019" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1019_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root - file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1020"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1020_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1020_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1020_1"><button class="btn btn-outline-success"><span class="job_id">1020 : Job ID e90706eac9da4f74a33ae9bb0e9c927a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1020_1" data-parent="#job_list___sub_accordion_1020" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1020_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] * "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] * "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] * "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: can't mul... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: can't mult... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1021"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1021_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1021_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1021_1"><button class="btn btn-outline-success"><span class="job_id">1021 : Job ID ea7f8e30c6844206811cc019cc3ce132</span></button></div></a><div aria-labelledby="job_list___sub_heading_1021_1" data-parent="#job_list___sub_accordion_1021" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1021_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" * g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" * g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" * g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: can't mul... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: can't mult... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1022"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1022_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1022_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1022_1"><button class="btn btn-outline-success"><span class="job_id">1022 : Job ID 46addb9e4a2e4e9db7d694edf6684a7e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1022_1" data-parent="#job_list___sub_accordion_1022" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1022_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir * stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: can't multiply sequence by non-int of type 'WindowsPath' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: can't multiply sequence by non-int of type 'WindowsPath' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1023"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1023_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1023_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1023_1"><button class="btn btn-outline-danger"><span class="job_id">1023 : Job ID 4581573071eb44de9484817a3b69a668</span></button></div></a><div aria-labelledby="job_list___sub_heading_1023_1" data-parent="#job_list___sub_accordion_1023" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1023_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root * fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1024"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1024_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1024_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1024_1"><button class="btn btn-outline-danger"><span class="job_id">1024 : Job ID 7fc7c8e9c170484fa50778decc65dfc4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1024_1" data-parent="#job_list___sub_accordion_1024" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1024_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root * file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1025"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1025_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1025_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1025_1"><button class="btn btn-outline-success"><span class="job_id">1025 : Job ID 4b616383aed44ff28ccda34b99928186</span></button></div></a><div aria-labelledby="job_list___sub_heading_1025_1" data-parent="#job_list___sub_accordion_1025" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1025_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent * "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent * "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: can't mu... 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1026"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1026_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1026_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1026_1"><button class="btn btn-outline-success"><span class="job_id">1026 : Job ID 482fb69737864454b03b13bb5266d98a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1026_1" data-parent="#job_list___sub_accordion_1026" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1026_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir * candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir * candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: can't multiply sequence by non-int of type 'WindowsPath' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: can't mu... 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1027"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1027_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1027_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1027_1"><button class="btn btn-outline-success"><span class="job_id">1027 : Job ID 946f4c00145545e383ac69e5c8288ee4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1027_1" data-parent="#job_list___sub_accordion_1027" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1027_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root * file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105140756725Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105141617300Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1028"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1028_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1028_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1028_1"><button class="btn btn-outline-success"><span class="job_id">1028 : Job ID 85bc7d77c69b46bbabeee0cc3878e1fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1028_1" data-parent="#job_list___sub_accordion_1028" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1028_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] // "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] // "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] // "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1029"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1029_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1029_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1029_1"><button class="btn btn-outline-success"><span class="job_id">1029 : Job ID 886e0fd6c0e34cc9ae3153dbb69a4825</span></button></div></a><div aria-labelledby="job_list___sub_heading_1029_1" data-parent="#job_list___sub_accordion_1029" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1029_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" // g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" // g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" // g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1030"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1030_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1030_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1030_1"><button class="btn btn-outline-success"><span class="job_id">1030 : Job ID dbe20d7575ec43308847e1c3b8b9b6f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1030_1" data-parent="#job_list___sub_accordion_1030" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1030_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir // stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for //: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for //: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1031"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1031_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1031_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1031_1"><button class="btn btn-outline-danger"><span class="job_id">1031 : Job ID e35eb686802b4faba7d8977940b877f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1031_1" data-parent="#job_list___sub_accordion_1031" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1031_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root // fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1032"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1032_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1032_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1032_1"><button class="btn btn-outline-danger"><span class="job_id">1032 : Job ID b557fac6677e40eebe550cc3b534beb8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1032_1" data-parent="#job_list___sub_accordion_1032" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1032_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root // file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1033"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1033_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1033_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1033_1"><button class="btn btn-outline-success"><span class="job_id">1033 : Job ID c6924dd3d816499dafc5ffe59ca5b585</span></button></div></a><div aria-labelledby="job_list___sub_heading_1033_1" data-parent="#job_list___sub_accordion_1033" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1033_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent // "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent // "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1034"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1034_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1034_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1034_1"><button class="btn btn-outline-success"><span class="job_id">1034 : Job ID 61b38ac2d83b4f59a686159b757ed556</span></button></div></a><div aria-labelledby="job_list___sub_heading_1034_1" data-parent="#job_list___sub_accordion_1034" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1034_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir // candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir // candidate ^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1035"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1035_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1035_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1035_1"><button class="btn btn-outline-danger"><span class="job_id">1035 : Job ID dbae153543f44c92a784d10a47c74c18</span></button></div></a><div aria-labelledby="job_list___sub_heading_1035_1" data-parent="#job_list___sub_accordion_1035" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1035_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root // file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1036"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1036_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1036_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1036_1"><button class="btn btn-outline-success"><span class="job_id">1036 : Job ID d22a7d9ecfb5475788324432c0c0c3da</span></button></div></a><div aria-labelledby="job_list___sub_heading_1036_1" data-parent="#job_list___sub_accordion_1036" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1036_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] % "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] % "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] % "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1037"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1037_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1037_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1037_1"><button class="btn btn-outline-success"><span class="job_id">1037 : Job ID 1ece16ddb2754645bbd8ceb5ba56e2c3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1037_1" data-parent="#job_list___sub_accordion_1037" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1037_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" % g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" % g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" % g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1038"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1038_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1038_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1038_1"><button class="btn btn-outline-success"><span class="job_id">1038 : Job ID 654136c0c6554db093d53d022d1d705a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1038_1" data-parent="#job_list___sub_accordion_1038" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1038_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir % stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for %: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for %: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1039"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1039_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1039_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1039_1"><button class="btn btn-outline-danger"><span class="job_id">1039 : Job ID ed8954bdc6464031a96bbaab6abf5352</span></button></div></a><div aria-labelledby="job_list___sub_heading_1039_1" data-parent="#job_list___sub_accordion_1039" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1039_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root % fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1040"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1040_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1040_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1040_1"><button class="btn btn-outline-danger"><span class="job_id">1040 : Job ID a4c15a9ccdea49e8a982b740e10fbe47</span></button></div></a><div aria-labelledby="job_list___sub_heading_1040_1" data-parent="#job_list___sub_accordion_1040" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1040_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root % file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1041"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1041_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1041_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1041_1"><button class="btn btn-outline-success"><span class="job_id">1041 : Job ID c8206dab2a734f5dba61610d84ee7f69</span></button></div></a><div aria-labelledby="job_list___sub_heading_1041_1" data-parent="#job_list___sub_accordion_1041" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1041_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent % "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent % "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1042"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1042_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1042_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1042_1"><button class="btn btn-outline-success"><span class="job_id">1042 : Job ID 217012eeeb3d4e41aaa4d406a8bdb0c7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1042_1" data-parent="#job_list___sub_accordion_1042" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1042_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir % candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir % candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1043"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1043_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1043_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1043_1"><button class="btn btn-outline-danger"><span class="job_id">1043 : Job ID b0c9195a6796486e949b55d633f4e945</span></button></div></a><div aria-labelledby="job_list___sub_heading_1043_1" data-parent="#job_list___sub_accordion_1043" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1043_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root % file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1044"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1044_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1044_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1044_1"><button class="btn btn-outline-success"><span class="job_id">1044 : Job ID dba655728e7846bbb034177c034a2175</span></button></div></a><div aria-labelledby="job_list___sub_heading_1044_1" data-parent="#job_list___sub_accordion_1044" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1044_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] ** "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] ** "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] ** "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1045"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1045_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1045_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1045_1"><button class="btn btn-outline-success"><span class="job_id">1045 : Job ID bbe143743e7d4bb097866d756b7906c2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1045_1" data-parent="#job_list___sub_accordion_1045" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1045_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" ** g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" ** g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" ** g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1046"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1046_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1046_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1046_1"><button class="btn btn-outline-success"><span class="job_id">1046 : Job ID 011c79bd68254f56a6419651942d8d34</span></button></div></a><div aria-labelledby="job_list___sub_heading_1046_1" data-parent="#job_list___sub_accordion_1046" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1046_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir ** stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1047"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1047_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1047_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1047_1"><button class="btn btn-outline-danger"><span class="job_id">1047 : Job ID 4b1bdf5e2f8142d2af455feb65f2f7e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1047_1" data-parent="#job_list___sub_accordion_1047" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1047_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root ** fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1048"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1048_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1048_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1048_1"><button class="btn btn-outline-danger"><span class="job_id">1048 : Job ID 393860ff42074a84ab39f6e04936b3c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1048_1" data-parent="#job_list___sub_accordion_1048" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1048_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root ** file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1049"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1049_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1049_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1049_1"><button class="btn btn-outline-success"><span class="job_id">1049 : Job ID ff7f2876103245419552d43c4c2a0d5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1049_1" data-parent="#job_list___sub_accordion_1049" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1049_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent ** "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent ** "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1050"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1050_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1050_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1050_1"><button class="btn btn-outline-success"><span class="job_id">1050 : Job ID f135edbd91f948c3b35ed8f363034bac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1050_1" data-parent="#job_list___sub_accordion_1050" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1050_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir ** candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir ** candidate ^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1051"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1051_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1051_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1051_1"><button class="btn btn-outline-danger"><span class="job_id">1051 : Job ID cdf254b8aaeb4019bbd299a678469375</span></button></div></a><div aria-labelledby="job_list___sub_heading_1051_1" data-parent="#job_list___sub_accordion_1051" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1051_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root ** file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1052"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1052_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1052_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1052_1"><button class="btn btn-outline-success"><span class="job_id">1052 : Job ID 6ec6da8645ef429eb4857c25be52fa4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1052_1" data-parent="#job_list___sub_accordion_1052" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1052_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] &gt;&gt; "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &gt;&gt; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &gt;&gt; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1053"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1053_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1053_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1053_1"><button class="btn btn-outline-success"><span class="job_id">1053 : Job ID 099903a260df48f9a85d74b417a919c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1053_1" data-parent="#job_list___sub_accordion_1053" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1053_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" &gt;&gt; g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &gt;&gt; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &gt;&gt; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1054"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1054_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1054_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1054_1"><button class="btn btn-outline-success"><span class="job_id">1054 : Job ID 1e72059400c542d98dfc9c3acabb580f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1054_1" data-parent="#job_list___sub_accordion_1054" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1054_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir &gt;&gt; stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1055"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1055_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1055_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1055_1"><button class="btn btn-outline-danger"><span class="job_id">1055 : Job ID a9c1946469d44086b00952753375ebe9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1055_1" data-parent="#job_list___sub_accordion_1055" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1055_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root &gt;&gt; fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1056"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1056_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1056_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1056_1"><button class="btn btn-outline-danger"><span class="job_id">1056 : Job ID 63095e99eb1841d2a0458a90283d3cff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1056_1" data-parent="#job_list___sub_accordion_1056" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1056_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &gt;&gt; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1057"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1057_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1057_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1057_1"><button class="btn btn-outline-success"><span class="job_id">1057 : Job ID 8eb29033e1074f939130d09e4a921ef2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1057_1" data-parent="#job_list___sub_accordion_1057" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1057_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent &gt;&gt; "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent &gt;&gt; "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1058"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1058_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1058_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1058_1"><button class="btn btn-outline-success"><span class="job_id">1058 : Job ID 3a226cf4dc4b42458109d87f94bb66cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1058_1" data-parent="#job_list___sub_accordion_1058" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1058_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir &gt;&gt; candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir &gt;&gt; candidate ^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1059"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1059_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1059_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1059_1"><button class="btn btn-outline-danger"><span class="job_id">1059 : Job ID 1471a0798e47455898f526fa28c6bad5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1059_1" data-parent="#job_list___sub_accordion_1059" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1059_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &gt;&gt; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1060"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1060_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1060_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1060_1"><button class="btn btn-outline-success"><span class="job_id">1060 : Job ID e5ea6511d4594a05a968a2121911acfd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1060_1" data-parent="#job_list___sub_accordion_1060" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1060_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] &lt;&lt; "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &lt;&lt; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &lt;&lt; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1061"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1061_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1061_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1061_1"><button class="btn btn-outline-success"><span class="job_id">1061 : Job ID 7bbf6535464342f09b733389538174f8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1061_1" data-parent="#job_list___sub_accordion_1061" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1061_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" &lt;&lt; g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &lt;&lt; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &lt;&lt; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1062"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1062_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1062_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1062_1"><button class="btn btn-outline-success"><span class="job_id">1062 : Job ID c43480079a2b4047960101ed48baa934</span></button></div></a><div aria-labelledby="job_list___sub_heading_1062_1" data-parent="#job_list___sub_accordion_1062" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1062_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir &lt;&lt; stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1063"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1063_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1063_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1063_1"><button class="btn btn-outline-danger"><span class="job_id">1063 : Job ID 0f9ef448b58142bc8fbbf3efddbdf380</span></button></div></a><div aria-labelledby="job_list___sub_heading_1063_1" data-parent="#job_list___sub_accordion_1063" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1063_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root &lt;&lt; fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1064"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1064_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1064_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1064_1"><button class="btn btn-outline-danger"><span class="job_id">1064 : Job ID 481c5cf0cead43b69b42e4235ac4b5cd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1064_1" data-parent="#job_list___sub_accordion_1064" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1064_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &lt;&lt; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1065"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1065_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1065_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1065_1"><button class="btn btn-outline-success"><span class="job_id">1065 : Job ID 0afe27460b9743aca537727ab005bde5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1065_1" data-parent="#job_list___sub_accordion_1065" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1065_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent &lt;&lt; "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent &lt;&lt; "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1066"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1066_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1066_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1066_1"><button class="btn btn-outline-success"><span class="job_id">1066 : Job ID 49951d6ba0744ce293a42df9b4183214</span></button></div></a><div aria-labelledby="job_list___sub_heading_1066_1" data-parent="#job_list___sub_accordion_1066" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1066_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir &lt;&lt; candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir &lt;&lt; candidate ^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1067"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1067_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1067_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1067_1"><button class="btn btn-outline-danger"><span class="job_id">1067 : Job ID 653f47d2ae604cddb1a69c3dc76a8c8d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1067_1" data-parent="#job_list___sub_accordion_1067" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1067_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &lt;&lt; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1068"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1068_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1068_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1068_1"><button class="btn btn-outline-success"><span class="job_id">1068 : Job ID 746141e5b0014a9da1109b6ff90e81f9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1068_1" data-parent="#job_list___sub_accordion_1068" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1068_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] | "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] | "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] | "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1069"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1069_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1069_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1069_1"><button class="btn btn-outline-success"><span class="job_id">1069 : Job ID 1e2b4f68ae824b84ae4925620c14ee5a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1069_1" data-parent="#job_list___sub_accordion_1069" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1069_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" | g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" | g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" | g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1070"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1070_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1070_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1070_1"><button class="btn btn-outline-success"><span class="job_id">1070 : Job ID 1cd4cf8f6f0846e8ab0cf1c0bc7a2b76</span></button></div></a><div aria-labelledby="job_list___sub_heading_1070_1" data-parent="#job_list___sub_accordion_1070" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1070_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir | stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for |: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for |: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1071"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1071_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1071_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1071_1"><button class="btn btn-outline-danger"><span class="job_id">1071 : Job ID a939e53e95d9410f9fb12c09645057fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1071_1" data-parent="#job_list___sub_accordion_1071" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1071_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root | fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1072"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1072_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1072_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1072_1"><button class="btn btn-outline-danger"><span class="job_id">1072 : Job ID 7bac221281414dd19470bfaf01cbe9b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1072_1" data-parent="#job_list___sub_accordion_1072" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1072_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root | file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1073"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1073_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1073_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1073_1"><button class="btn btn-outline-success"><span class="job_id">1073 : Job ID 8794512881424c6dbe854ac8e4639599</span></button></div></a><div aria-labelledby="job_list___sub_heading_1073_1" data-parent="#job_list___sub_accordion_1073" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1073_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent | "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent | "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1074"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1074_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1074_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1074_1"><button class="btn btn-outline-success"><span class="job_id">1074 : Job ID dfd88d3704e044738ac363539d80ffb9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1074_1" data-parent="#job_list___sub_accordion_1074" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1074_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir | candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir | candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1075"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1075_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1075_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1075_1"><button class="btn btn-outline-danger"><span class="job_id">1075 : Job ID 5e80ca84d54c45158622973a4c92472e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1075_1" data-parent="#job_list___sub_accordion_1075" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1075_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root | file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1076"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1076_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1076_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1076_1"><button class="btn btn-outline-success"><span class="job_id">1076 : Job ID 9919dc3393904446b1cb0558dc425805</span></button></div></a><div aria-labelledby="job_list___sub_heading_1076_1" data-parent="#job_list___sub_accordion_1076" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1076_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] &amp; "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &amp; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] &amp; "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1077"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1077_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1077_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1077_1"><button class="btn btn-outline-success"><span class="job_id">1077 : Job ID 5d91c6fc7d964df19cacd7b69b58f74d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1077_1" data-parent="#job_list___sub_accordion_1077" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1077_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" &amp; g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &amp; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" &amp; g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1078"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1078_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1078_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1078_1"><button class="btn btn-outline-success"><span class="job_id">1078 : Job ID 3b10ba64841147998641e0b5a6510c21</span></button></div></a><div aria-labelledby="job_list___sub_heading_1078_1" data-parent="#job_list___sub_accordion_1078" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1078_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir &amp; stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1079"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1079_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1079_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1079_1"><button class="btn btn-outline-danger"><span class="job_id">1079 : Job ID 0dde39087a0c452996c7802b1e4f4312</span></button></div></a><div aria-labelledby="job_list___sub_heading_1079_1" data-parent="#job_list___sub_accordion_1079" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1079_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root &amp; fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1080"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1080_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1080_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1080_1"><button class="btn btn-outline-success"><span class="job_id">1080 : Job ID d9d3189e38bf4e54954b822eeaedfe7d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1080_1" data-parent="#job_list___sub_accordion_1080" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1080_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &amp; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222506687919Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222507730559Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1081"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1081_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1081_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1081_1"><button class="btn btn-outline-success"><span class="job_id">1081 : Job ID d8898d039fd747f39eeacec3c6696634</span></button></div></a><div aria-labelledby="job_list___sub_heading_1081_1" data-parent="#job_list___sub_accordion_1081" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1081_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent &amp; "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent &amp; "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1082"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1082_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1082_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1082_1"><button class="btn btn-outline-success"><span class="job_id">1082 : Job ID 5d2df8958ce4422099cfcaa86445139e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1082_1" data-parent="#job_list___sub_accordion_1082" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1082_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir &amp; candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir &amp; candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1083"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1083_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1083_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1083_1"><button class="btn btn-outline-danger"><span class="job_id">1083 : Job ID 85d9d286ba3b4ec094b6c8b49de68672</span></button></div></a><div aria-labelledby="job_list___sub_heading_1083_1" data-parent="#job_list___sub_accordion_1083" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1083_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root &amp; file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1084"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1084_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1084_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1084_1"><button class="btn btn-outline-success"><span class="job_id">1084 : Job ID acc5130fbf9f455fbbfcc7175a5e6395</span></button></div></a><div aria-labelledby="job_list___sub_heading_1084_1" data-parent="#job_list___sub_accordion_1084" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1084_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 45), end pos: (341, 46)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] ^ "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] ^ "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] ^ "files" / g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'str' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1085"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1085_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1085_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1085_1"><button class="btn btn-outline-success"><span class="job_id">1085 : Job ID c6816b7b990846c79bb41746d80199fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1085_1" data-parent="#job_list___sub_accordion_1085" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1085_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=341" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (341, 55), end pos: (341, 56)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -338,7 +338,7 @@ ) return jsonify({"error": "invalid filename"}), 400 - user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] + user_dir = app.config["STORAGE_DIR"] / "files" ^ g.user["login"] user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" ^ g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'WindowsPath' and 'str' server.py:341: TypeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type if file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) return jsonify({"error": "only PDF files are allowed"}), 415 # Sanitize filename fname = secure_filename(file.filename) if not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) return jsonify({"error": "invalid filename"}), 400 &gt; user_dir = app.config["STORAGE_DIR"] / "files" ^ g.user["login"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'WindowsPath' and 'str' server.py:341: TypeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - TypeError: unsupport... FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - TypeError: unsupporte... FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1086"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1086_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1086_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1086_1"><button class="btn btn-outline-success"><span class="job_id">1086 : Job ID dafe9a23e9634b8b823a3fab53574454</span></button></div></a><div aria-labelledby="job_list___sub_heading_1086_1" data-parent="#job_list___sub_accordion_1086" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1086_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=350" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (350, 36), end pos: (350, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -347,7 +347,7 @@ try: # Check for path traversal attempts - stored_path = (user_dir / stored_name).resolve() + stored_path = (user_dir ^ stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for ^: 'WindowsPath' and 'str' __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:357 File save error: unsupported operand type(s) for ^: 'WindowsPath' and 'str' _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 500 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 500 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1087"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1087_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1087_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1087_1"><button class="btn btn-outline-danger"><span class="job_id">1087 : Job ID a2a9308bdc6042d480c2cda186414ecd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1087_1" data-parent="#job_list___sub_accordion_1087" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1087_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=785" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (785, 30), end pos: (785, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -782,7 +782,7 @@ storage_root = storage_root.resolve() fp = Path(p) if not fp.is_absolute(): - fp = storage_root / fp + fp = storage_root ^ fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1088"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1088_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1088_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1088_1"><button class="btn btn-outline-danger"><span class="job_id">1088 : Job ID 282047fcfb484226bfe4f7b3de13516c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1088_1" data-parent="#job_list___sub_accordion_1088" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1088_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=981" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (981, 37), end pos: (981, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -978,7 +978,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root ^ file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1089"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1089_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1089_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1089_1"><button class="btn btn-outline-success"><span class="job_id">1089 : Job ID fc3e300d48e0463380db3762add16fac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1089_1" data-parent="#job_list___sub_accordion_1089" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1089_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1045" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1045, 36), end pos: (1045, 37)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1042,7 +1042,7 @@ # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) - dest_dir = file_path.parent / "watermarks" + dest_dir = file_path.parent ^ "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) &gt; dest_dir = file_path.parent ^ "watermarks" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'WindowsPath' and 'str' server.py:1045: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1090"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1090_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1090_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1090_1"><button class="btn btn-outline-success"><span class="job_id">1090 : Job ID 0482b9a54f4647e9afab2b69b787ea5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1090_1" data-parent="#job_list___sub_accordion_1090" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1090_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1049" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1049, 29), end pos: (1049, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1046,7 +1046,7 @@ dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" - dest_path = dest_dir / candidate + dest_path = dest_dir ^ candidate # write bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" &gt; dest_path = dest_dir ^ candidate ^^^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'WindowsPath' and 'str' server.py:1049: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: unsuppor... 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1091"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1091_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1091_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1091_1"><button class="btn btn-outline-danger"><span class="job_id">1091 : Job ID b9123e6388494f67aa9e84da9f89cdb6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1091_1" data-parent="#job_list___sub_accordion_1091" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1091_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1211" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1211, 37), end pos: (1211, 38)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1208,7 +1208,7 @@ storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): - file_path = storage_root / file_path + file_path = storage_root ^ file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1092"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1092_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1092_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1092_1"><button class="btn btn-outline-danger"><span class="job_id">1092 : Job ID a1f9771e49a746048c8ef5467c68b135</span></button></div></a><div aria-labelledby="job_list___sub_heading_1092_1" data-parent="#job_list___sub_accordion_1092" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1092_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2+63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1093"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1093_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1093_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1093_1"><button class="btn btn-outline-success"><span class="job_id">1093 : Job ID fb2dae9ec7fd40a39a75c0711d12a018</span></button></div></a><div aria-labelledby="job_list___sub_heading_1093_1" data-parent="#job_list___sub_accordion_1093" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1093_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2-63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1094"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1094_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1094_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1094_1"><button class="btn btn-outline-danger"><span class="job_id">1094 : Job ID c5de3077de054457875d1e9f4fba6c19</span></button></div></a><div aria-labelledby="job_list___sub_heading_1094_1" data-parent="#job_list___sub_accordion_1094" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1094_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2*63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1095"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1095_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1095_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1095_1"><button class="btn btn-outline-success"><span class="job_id">1095 : Job ID 9367fd1665c949bb8df8f33e1255023a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1095_1" data-parent="#job_list___sub_accordion_1095" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1095_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2/63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T100850618599Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T100851493672Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 10 failed, 32 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1096"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1096_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1096_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1096_1"><button class="btn btn-outline-success"><span class="job_id">1096 : Job ID 052978a1ae314d3ca7b227a18c4dd766</span></button></div></a><div aria-labelledby="job_list___sub_heading_1096_1" data-parent="#job_list___sub_accordion_1096" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1096_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2//63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1097"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1097_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1097_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1097_1"><button class="btn btn-outline-success"><span class="job_id">1097 : Job ID 59102f46851a4a60ad5b815692af6016</span></button></div></a><div aria-labelledby="job_list___sub_heading_1097_1" data-parent="#job_list___sub_accordion_1097" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1097_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2%63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/list-versions", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/list-versions", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:260: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/get-document", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/get-document", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:308: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:580 Invalid document id in query _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:365: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 404 FAILED ..\test\test_api.py::test_get_document_route - assert 400 == 404 FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 404 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1098"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1098_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1098_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1098_1"><button class="btn btn-outline-success"><span class="job_id">1098 : Job ID 44c2cb32011a485c87518dae5a7726d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1098_1" data-parent="#job_list___sub_accordion_1098" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1098_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2&gt;&gt;63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1099"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1099_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1099_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1099_1"><button class="btn btn-outline-success"><span class="job_id">1099 : Job ID f8add8f73bc2445babcd7f4a9fa943f1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1099_1" data-parent="#job_list___sub_accordion_1099" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1099_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2&lt;&lt;63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T173915036849Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T173915918889Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1100"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1100_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1100_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1100_1"><button class="btn btn-outline-danger"><span class="job_id">1100 : Job ID 09037740995e4e1c8a59e9fbb2673e24</span></button></div></a><div aria-labelledby="job_list___sub_heading_1100_1" data-parent="#job_list___sub_accordion_1100" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1100_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2|63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1101"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1101_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1101_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1101_1"><button class="btn btn-outline-success"><span class="job_id">1101 : Job ID 0fc047d524f849ab98b4f7c19838455d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1101_1" data-parent="#job_list___sub_accordion_1101" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1101_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2&amp;63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/list-versions", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/list-versions", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:260: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/get-document", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/get-document", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:308: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:580 Invalid document id in query _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) &gt; assert resp.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:365: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 404 FAILED ..\test\test_api.py::test_get_document_route - assert 400 == 404 FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 404 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1102"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1102_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1102_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1102_1"><button class="btn btn-outline-success"><span class="job_id">1102 : Job ID 65cbc4726ac74d578e2a949cbf8b11d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1102_1" data-parent="#job_list___sub_accordion_1102" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1102_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 15), end pos: (34, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Pow_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2^63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102937403804Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102938290557Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1103"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1103_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1103_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1103_1"><button class="btn btn-outline-success"><span class="job_id">1103 : Job ID 81e8935bec184b099f3a04d09ac0eed9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1103_1" data-parent="#job_list___sub_accordion_1103" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1103_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int + None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int + None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:38:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:38:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:38:27+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:38:27+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1104"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1104_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1104_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1104_1"><button class="btn btn-outline-success"><span class="job_id">1104 : Job ID ee9d991922c347c1a7bb537a552778aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1104_1" data-parent="#job_list___sub_accordion_1104" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1104_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int + None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int + None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:58:12+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:58:12+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T19:58:13+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:58:14+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1105"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1105_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1105_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1105_1"><button class="btn btn-outline-success"><span class="job_id">1105 : Job ID 1eb1fcf6754a4d6cae393dafe3dd7f60</span></button></div></a><div aria-labelledby="job_list___sub_heading_1105_1" data-parent="#job_list___sub_accordion_1105" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1105_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int + None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int + None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:35:55+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:35:55+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T00:35:56+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:35:56+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1106"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1106_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1106_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1106_1"><button class="btn btn-outline-success"><span class="job_id">1106 : Job ID 4c509e0e2e3049808d812b3c942e4afa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1106_1" data-parent="#job_list___sub_accordion_1106" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1106_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int + None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int + None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T17:33:50+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:33:50+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T17:33:51+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:33:51+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1107"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1107_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1107_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1107_1"><button class="btn btn-outline-success"><span class="job_id">1107 : Job ID e6873a3a30de4179870d42b23a8b8538</span></button></div></a><div aria-labelledby="job_list___sub_heading_1107_1" data-parent="#job_list___sub_accordion_1107" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1107_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes + bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for +: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1108"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1108_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1108_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1108_1"><button class="btn btn-outline-success"><span class="job_id">1108 : Job ID 862fedca9a9e42cca0ee201032ca9f47</span></button></div></a><div aria-labelledby="job_list___sub_heading_1108_1" data-parent="#job_list___sub_accordion_1108" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1108_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int + None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int + None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:05:39+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:05:39+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T00:05:40+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:05:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1109"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1109_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1109_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1109_1"><button class="btn btn-outline-success"><span class="job_id">1109 : Job ID 098b927b3d0e4c37b44c025298dee40b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1109_1" data-parent="#job_list___sub_accordion_1109" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1109_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int - None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int - None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T14:32:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:32:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T14:32:27+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:32:27+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1110"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1110_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1110_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1110_1"><button class="btn btn-outline-success"><span class="job_id">1110 : Job ID db50dd8fba5b455a8fce594992ede6f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1110_1" data-parent="#job_list___sub_accordion_1110" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1110_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int - None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int - None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:26:01+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:26:01+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T18:26:02+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:26:02+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1111"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1111_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1111_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1111_1"><button class="btn btn-outline-success"><span class="job_id">1111 : Job ID fb0df27a790542afa00f476efe40accb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1111_1" data-parent="#job_list___sub_accordion_1111" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1111_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int - None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int - None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T16:40:34+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:40:34+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T16:40:35+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:40:35+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1112"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1112_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1112_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1112_1"><button class="btn btn-outline-success"><span class="job_id">1112 : Job ID a532ba145e83426ebd409bfe8d8964f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1112_1" data-parent="#job_list___sub_accordion_1112" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1112_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int - None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int - None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T20:38:54+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:38:54+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T20:38:55+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:38:55+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1113"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1113_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1113_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1113_1"><button class="btn btn-outline-success"><span class="job_id">1113 : Job ID 31605f2218ef459faaf8f9f6685804fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1113_1" data-parent="#job_list___sub_accordion_1113" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1113_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes - bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for -: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1114"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1114_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1114_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1114_1"><button class="btn btn-outline-success"><span class="job_id">1114 : Job ID 0588bf9401fe4ea2b97885fddd1f0be9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1114_1" data-parent="#job_list___sub_accordion_1114" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1114_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int - None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int - None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:12:31+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:12:31+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T19:12:32+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:12:33+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1115"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1115_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1115_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1115_1"><button class="btn btn-outline-success"><span class="job_id">1115 : Job ID 812c0cdac7854be1a029ee9376205599</span></button></div></a><div aria-labelledby="job_list___sub_heading_1115_1" data-parent="#job_list___sub_accordion_1115" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1115_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int * None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int * None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:33:20+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:33:20+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T19:33:21+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:33:21+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1116"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1116_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1116_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1116_1"><button class="btn btn-outline-success"><span class="job_id">1116 : Job ID ae6007b0cd5846daa530a21fdcfcbde6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1116_1" data-parent="#job_list___sub_accordion_1116" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1116_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int * None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int * None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:27:21+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:27:21+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:27:22+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:27:22+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1117"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1117_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1117_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1117_1"><button class="btn btn-outline-success"><span class="job_id">1117 : Job ID ce71a090db814a4bb8e86020dc26de47</span></button></div></a><div aria-labelledby="job_list___sub_heading_1117_1" data-parent="#job_list___sub_accordion_1117" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1117_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int * None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int * None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:22:50+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:22:50+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T01:22:51+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:22:51+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1118"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1118_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1118_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1118_1"><button class="btn btn-outline-success"><span class="job_id">1118 : Job ID 8a43a1a303644f59826f0ef6579dd18d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1118_1" data-parent="#job_list___sub_accordion_1118" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1118_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int * None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int * None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:47:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:47:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:47:07+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:47:07+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1119"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1119_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1119_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1119_1"><button class="btn btn-outline-success"><span class="job_id">1119 : Job ID 88a0759b3ee8435aaaf1fa45c2176c0d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1119_1" data-parent="#job_list___sub_accordion_1119" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1119_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes * bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for *: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1120"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1120_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1120_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1120_1"><button class="btn btn-outline-success"><span class="job_id">1120 : Job ID aa00158f86844f139fce583e9ee6ca03</span></button></div></a><div aria-labelledby="job_list___sub_heading_1120_1" data-parent="#job_list___sub_accordion_1120" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1120_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int * None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int * None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:24:46+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:24:46+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:24:47+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:24:47+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1121"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1121_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1121_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1121_1"><button class="btn btn-outline-success"><span class="job_id">1121 : Job ID 09ddf60ee38e48a2810ec2295024304d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1121_1" data-parent="#job_list___sub_accordion_1121" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1121_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int / None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int / None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:37:58+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:37:58+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T00:37:59+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:37:59+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1122"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1122_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1122_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1122_1"><button class="btn btn-outline-success"><span class="job_id">1122 : Job ID 688a22eb2b62469b9246170ec1483eb2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1122_1" data-parent="#job_list___sub_accordion_1122" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1122_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int / None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int / None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T15:17:49+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:17:49+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T15:17:50+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:17:50+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1123"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1123_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1123_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1123_1"><button class="btn btn-outline-success"><span class="job_id">1123 : Job ID 3a81eec9a1ce4ae4b40cd0239a0885df</span></button></div></a><div aria-labelledby="job_list___sub_heading_1123_1" data-parent="#job_list___sub_accordion_1123" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1123_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int / None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int / None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:54:21+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:54:21+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:54:22+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:54:22+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1124"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1124_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1124_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1124_1"><button class="btn btn-outline-success"><span class="job_id">1124 : Job ID 1581703d6b834f96b513b0bdef8db16b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1124_1" data-parent="#job_list___sub_accordion_1124" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1124_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int / None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int / None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:36:45+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:36:45+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:36:46+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:36:46+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1125"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1125_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1125_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1125_1"><button class="btn btn-outline-success"><span class="job_id">1125 : Job ID ff72fd8640914793980de614ee2c54c3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1125_1" data-parent="#job_list___sub_accordion_1125" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1125_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes / bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for /: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1126"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1126_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1126_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1126_1"><button class="btn btn-outline-success"><span class="job_id">1126 : Job ID b17ed40ee4bf43f6936d395f7a0014ef</span></button></div></a><div aria-labelledby="job_list___sub_heading_1126_1" data-parent="#job_list___sub_accordion_1126" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1126_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int / None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int / None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T20:43:52+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:43:52+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T20:43:53+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:43:53+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1127"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1127_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1127_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1127_1"><button class="btn btn-outline-success"><span class="job_id">1127 : Job ID 5ceb48a52d284366b10d853db0fec919</span></button></div></a><div aria-labelledby="job_list___sub_heading_1127_1" data-parent="#job_list___sub_accordion_1127" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1127_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int // None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int // None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T15:38:08+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:38:08+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T15:38:09+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:38:09+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1128"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1128_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1128_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1128_1"><button class="btn btn-outline-success"><span class="job_id">1128 : Job ID 376c79751c204c02943cd6d3b828e6bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1128_1" data-parent="#job_list___sub_accordion_1128" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1128_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int // None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int // None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T17:25:46+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:25:46+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T17:25:47+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:25:47+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1129"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1129_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1129_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1129_1"><button class="btn btn-outline-success"><span class="job_id">1129 : Job ID 366ddbaca072422bbe36d70f4d773fc1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1129_1" data-parent="#job_list___sub_accordion_1129" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1129_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int // None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int // None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T16:22:05+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:22:05+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T16:22:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:22:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1130"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1130_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1130_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1130_1"><button class="btn btn-outline-success"><span class="job_id">1130 : Job ID 0b61f713c555497ebf639b63fcdf13a8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1130_1" data-parent="#job_list___sub_accordion_1130" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1130_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int // None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int // None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:03:15+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:03:15+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:03:16+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:03:16+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1131"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1131_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1131_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1131_1"><button class="btn btn-outline-success"><span class="job_id">1131 : Job ID 2d43596e47fb47f3a43b7c5488e1f8f8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1131_1" data-parent="#job_list___sub_accordion_1131" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1131_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes // bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for //: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1132"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1132_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1132_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1132_1"><button class="btn btn-outline-success"><span class="job_id">1132 : Job ID d2505af204cc4039bcb8a52c3bf8a84d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1132_1" data-parent="#job_list___sub_accordion_1132" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1132_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int // None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int // None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T17:49:52+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:49:52+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T17:49:53+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:49:53+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1133"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1133_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1133_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1133_1"><button class="btn btn-outline-success"><span class="job_id">1133 : Job ID ce6f70127374430e8ea73c3fda1c5ea2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1133_1" data-parent="#job_list___sub_accordion_1133" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1133_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int % None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int % None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:34:42+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:34:42+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:34:43+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:34:43+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1134"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1134_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1134_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1134_1"><button class="btn btn-outline-success"><span class="job_id">1134 : Job ID 55b7d430488d40eebabfd92eebd6bee3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1134_1" data-parent="#job_list___sub_accordion_1134" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1134_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int % None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int % None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:30:24+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:30:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T19:30:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:30:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1135"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1135_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1135_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1135_1"><button class="btn btn-outline-success"><span class="job_id">1135 : Job ID 3a3d40733fd64102b7ea052b2adf3449</span></button></div></a><div aria-labelledby="job_list___sub_heading_1135_1" data-parent="#job_list___sub_accordion_1135" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1135_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int % None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int % None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T16:17:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:17:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T16:17:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:17:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1136"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1136_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1136_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1136_1"><button class="btn btn-outline-success"><span class="job_id">1136 : Job ID 74b9d274edfd47c491b5cc1de672ccd3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1136_1" data-parent="#job_list___sub_accordion_1136" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1136_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int % None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int % None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:01:03+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:01:03+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:01:04+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:01:04+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1137"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1137_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1137_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1137_1"><button class="btn btn-outline-success"><span class="job_id">1137 : Job ID 1368675df2874cb3a5c75c28ac0f97a5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1137_1" data-parent="#job_list___sub_accordion_1137" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1137_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes % bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for %: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1138"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1138_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1138_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1138_1"><button class="btn btn-outline-success"><span class="job_id">1138 : Job ID d7f55e156c62431cb953ec6a74bcd7f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1138_1" data-parent="#job_list___sub_accordion_1138" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1138_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int % None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int % None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:56:17+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:56:17+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:56:18+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:56:18+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1139"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1139_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1139_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1139_1"><button class="btn btn-outline-success"><span class="job_id">1139 : Job ID a2be693e3c704330bf317e8d27b705cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1139_1" data-parent="#job_list___sub_accordion_1139" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1139_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int ** None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int ** None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:20:48+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:20:48+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T01:20:49+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:20:49+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1140"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1140_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1140_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1140_1"><button class="btn btn-outline-success"><span class="job_id">1140 : Job ID e913d32aec5c4aeabd54b63454ba64dd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1140_1" data-parent="#job_list___sub_accordion_1140" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1140_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int ** None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int ** None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T13:54:02+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:54:02+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T13:54:03+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:54:03+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1141"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1141_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1141_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1141_1"><button class="btn btn-outline-success"><span class="job_id">1141 : Job ID 53f12ff360094b8ab5ae25b6b6c2fc3d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1141_1" data-parent="#job_list___sub_accordion_1141" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1141_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int ** None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int ** None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:23:13+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:23:14+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T18:23:14+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:23:15+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1142"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1142_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1142_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1142_1"><button class="btn btn-outline-success"><span class="job_id">1142 : Job ID fe7291e994e34affa0d540e0daa3a4c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1142_1" data-parent="#job_list___sub_accordion_1142" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1142_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int ** None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int ** None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T16:25:57+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:25:57+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T16:25:58+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:25:58+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1143"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1143_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1143_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1143_1"><button class="btn btn-outline-success"><span class="job_id">1143 : Job ID 05391be499e24e739aeed16682d8ff1d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1143_1" data-parent="#job_list___sub_accordion_1143" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1143_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes ** bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ** or pow(): 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1144"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1144_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1144_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1144_1"><button class="btn btn-outline-success"><span class="job_id">1144 : Job ID 961500a163e2440da2c6b8bb2b60ac52</span></button></div></a><div aria-labelledby="job_list___sub_heading_1144_1" data-parent="#job_list___sub_accordion_1144" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1144_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int ** None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int ** None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T13:17:28+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:17:28+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T13:17:29+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:17:29+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1145"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1145_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1145_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1145_1"><button class="btn btn-outline-success"><span class="job_id">1145 : Job ID 95c7f2fadecc413f86bd42844be03e6e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1145_1" data-parent="#job_list___sub_accordion_1145" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1145_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int &gt;&gt; None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int &gt;&gt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:01:17+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:01:17+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:01:18+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:01:18+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1146"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1146_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1146_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1146_1"><button class="btn btn-outline-success"><span class="job_id">1146 : Job ID 876899f0db664adc9aea3650e32a9570</span></button></div></a><div aria-labelledby="job_list___sub_heading_1146_1" data-parent="#job_list___sub_accordion_1146" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1146_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int &gt;&gt; None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int &gt;&gt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T21:09:05+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T21:09:05+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T21:09:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T21:09:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1147"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1147_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1147_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1147_1"><button class="btn btn-outline-success"><span class="job_id">1147 : Job ID 5c9f70113d20417aaa6d9804355effde</span></button></div></a><div aria-labelledby="job_list___sub_heading_1147_1" data-parent="#job_list___sub_accordion_1147" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1147_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int &gt;&gt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int &gt;&gt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:26:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:26:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:26:07+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:26:07+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1148"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1148_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1148_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1148_1"><button class="btn btn-outline-success"><span class="job_id">1148 : Job ID a13413f64f4b4aaf9428da7781fbbb31</span></button></div></a><div aria-labelledby="job_list___sub_heading_1148_1" data-parent="#job_list___sub_accordion_1148" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1148_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int &gt;&gt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int &gt;&gt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:48:40+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:48:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T00:48:41+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:48:41+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1149"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1149_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1149_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1149_1"><button class="btn btn-outline-success"><span class="job_id">1149 : Job ID 1ad8c4ad216d446d8a4e5d690de35d96</span></button></div></a><div aria-labelledby="job_list___sub_heading_1149_1" data-parent="#job_list___sub_accordion_1149" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1149_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes &gt;&gt; bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &gt;&gt;: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1150"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1150_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1150_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1150_1"><button class="btn btn-outline-success"><span class="job_id">1150 : Job ID 3595aca85fdd407daf0c9ca511f5960f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1150_1" data-parent="#job_list___sub_accordion_1150" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1150_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int &gt;&gt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int &gt;&gt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:32:44+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:32:44+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T19:32:45+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:32:45+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1151"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1151_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1151_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1151_1"><button class="btn btn-outline-success"><span class="job_id">1151 : Job ID 95dc1eb91fd84bb19f9af580c124c5c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1151_1" data-parent="#job_list___sub_accordion_1151" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1151_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int &lt;&lt; None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int &lt;&lt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:30:44+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:30:45+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:30:45+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:30:46+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1152"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1152_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1152_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1152_1"><button class="btn btn-outline-success"><span class="job_id">1152 : Job ID 7ec0658949ae44a9b40ac64ea37751ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1152_1" data-parent="#job_list___sub_accordion_1152" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1152_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int &lt;&lt; None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int &lt;&lt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:35:24+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:35:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T19:35:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:35:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1153"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1153_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1153_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1153_1"><button class="btn btn-outline-success"><span class="job_id">1153 : Job ID d5fc5fc55a6d46f6a4700bfdd2527642</span></button></div></a><div aria-labelledby="job_list___sub_heading_1153_1" data-parent="#job_list___sub_accordion_1153" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1153_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int &lt;&lt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int &lt;&lt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:19:40+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:19:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T18:19:41+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:19:41+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1154"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1154_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1154_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1154_1"><button class="btn btn-outline-success"><span class="job_id">1154 : Job ID da5d56ac5fe44e72ba0bda7564043ab6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1154_1" data-parent="#job_list___sub_accordion_1154" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1154_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int &lt;&lt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int &lt;&lt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T16:10:39+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:10:39+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T16:10:40+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T16:10:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1155"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1155_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1155_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1155_1"><button class="btn btn-outline-success"><span class="job_id">1155 : Job ID eafbf71bf0f64706b6e601d20d0ee192</span></button></div></a><div aria-labelledby="job_list___sub_heading_1155_1" data-parent="#job_list___sub_accordion_1155" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1155_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes &lt;&lt; bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for &lt;&lt;: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1156"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1156_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1156_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1156_1"><button class="btn btn-outline-success"><span class="job_id">1156 : Job ID a86a23a36e204d7c81bd6a10a5268fc5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1156_1" data-parent="#job_list___sub_accordion_1156" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1156_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int &lt;&lt; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int &lt;&lt; None = None): ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:53:39+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:53:39+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-18T01:53:40+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:53:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1157"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1157_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1157_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1157_1"><button class="btn btn-outline-success"><span class="job_id">1157 : Job ID 5aff1083231840698f2aa3646801a42f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1157_1" data-parent="#job_list___sub_accordion_1157" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1157_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int &amp; None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int &amp; None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:39:09+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:39:09+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T18:39:10+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:39:10+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1158"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1158_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1158_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1158_1"><button class="btn btn-outline-success"><span class="job_id">1158 : Job ID 63d33c94d0314f4ea08cdd8c6cd5d843</span></button></div></a><div aria-labelledby="job_list___sub_heading_1158_1" data-parent="#job_list___sub_accordion_1158" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1158_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int &amp; None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int &amp; None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:48:18+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:48:18+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:48:19+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:48:19+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1159"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1159_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1159_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1159_1"><button class="btn btn-outline-success"><span class="job_id">1159 : Job ID ce46d4ec69d347d7a340a464e29c5d45</span></button></div></a><div aria-labelledby="job_list___sub_heading_1159_1" data-parent="#job_list___sub_accordion_1159" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1159_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int &amp; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int &amp; None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:48:16+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:48:16+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-18T01:48:17+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:48:17+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1160"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1160_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1160_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1160_1"><button class="btn btn-outline-success"><span class="job_id">1160 : Job ID 2765219ac64d4075b34ad32580ff56d9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1160_1" data-parent="#job_list___sub_accordion_1160" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1160_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int &amp; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int &amp; None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:20:01+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:20:01+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:20:02+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:20:02+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1161"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1161_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1161_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1161_1"><button class="btn btn-outline-success"><span class="job_id">1161 : Job ID 07acb563033941268b5914949c6f6de4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1161_1" data-parent="#job_list___sub_accordion_1161" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1161_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes &amp; bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124705768693Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124706757192Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1162"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1162_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1162_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1162_1"><button class="btn btn-outline-success"><span class="job_id">1162 : Job ID 9458576177cb4df794a6c087228f5bf4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1162_1" data-parent="#job_list___sub_accordion_1162" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1162_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int &amp; None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int &amp; None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T17:33:36+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:33:36+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T17:33:37+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:33:37+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1163"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1163_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1163_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1163_1"><button class="btn btn-outline-success"><span class="job_id">1163 : Job ID 1e3da21a288d40c58465106cae4548a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1163_1" data-parent="#job_list___sub_accordion_1163" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1163_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=456" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (456, 39), end pos: (456, 40)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -453,7 +453,7 @@ @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth - def list_versions(document_id: int | None = None): + def list_versions(document_id: int ^ None = None): # Input validation if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:456: in create_app def list_versions(document_id: int ^ None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:30:30+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:30:30+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:30:31+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:30:31+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1164"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1164_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1164_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1164_1"><button class="btn btn-outline-success"><span class="job_id">1164 : Job ID 98bce5c625f745579b51adeff8d06066</span></button></div></a><div aria-labelledby="job_list___sub_heading_1164_1" data-parent="#job_list___sub_accordion_1164" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1164_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=573" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (573, 38), end pos: (573, 39)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -570,7 +570,7 @@ @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth - def get_document(document_id: int | None = None): + def get_document(document_id: int ^ None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:573: in create_app def get_document(document_id: int ^ None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:44:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:44:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:44:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:44:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1165"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1165_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1165_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1165_1"><button class="btn btn-outline-success"><span class="job_id">1165 : Job ID f7843290c2b14fedbf2d9fe3389c5833</span></button></div></a><div aria-labelledby="job_list___sub_heading_1165_1" data-parent="#job_list___sub_accordion_1165" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1165_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=804" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (804, 41), end pos: (804, 42)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -801,7 +801,7 @@ @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth - def delete_document(document_id: int | None = None): + def delete_document(document_id: int ^ None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""): document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:804: in create_app def delete_document(document_id: int ^ None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:16:17+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:16:17+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T01:16:18+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:16:18+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1166"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1166_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1166_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1166_1"><button class="btn btn-outline-success"><span class="job_id">1166 : Job ID f063ecd54f4e496bb0090285c77ac98a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1166_1" data-parent="#job_list___sub_accordion_1166" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1166_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=909" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (909, 42), end pos: (909, 43)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -906,7 +906,7 @@ @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth - def create_watermark(document_id: int | None = None): + def create_watermark(document_id: int ^ None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:909: in create_app def create_watermark(document_id: int ^ None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T15:34:01+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:34:01+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T15:34:02+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:34:02+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1167"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1167_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1167_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1167_1"><button class="btn btn-outline-success"><span class="job_id">1167 : Job ID 9014eb7e55b141c38c5a450321502bd9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1167_1" data-parent="#job_list___sub_accordion_1167" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1167_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 47), end pos: (1024, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes ^ bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 32 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: unsupported operand type(s) for ^: 'type' and 'type' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1168"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1168_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1168_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1168_1"><button class="btn btn-outline-success"><span class="job_id">1168 : Job ID 41d119c0b85c4bfea360333b096737ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_1168_1" data-parent="#job_list___sub_accordion_1168" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1168_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1146, 40), end pos: (1146, 41)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1143,7 +1143,7 @@ @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth - def read_watermark(document_id: int | None = None): + def read_watermark(document_id: int ^ None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id: document_id = (</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1262: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:1146: in create_app def read_watermark(document_id: int ^ None = None): ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:42:55+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:42:55+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T18:42:56+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:42:56+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1169"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1169_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1169_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1169_1"><button class="btn btn-outline-success"><span class="job_id">1169 : Job ID 1df56ddb7afc4845a02bed2d140adc98</span></button></div></a><div aria-labelledby="job_list___sub_heading_1169_1" data-parent="#job_list___sub_accordion_1169" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1169_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename != "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1170"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1170_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1170_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1170_1"><button class="btn btn-outline-success"><span class="job_id">1170 : Job ID ee2379cf617149688c8e259fc56439a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1170_1" data-parent="#job_list___sub_accordion_1170" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1170_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 78), end pos: (1024, 80)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) != 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 44 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1026 Watermarking produced no output for document 1 using method robust-xmp ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1171"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1171_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1171_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1171_1"><button class="btn btn-outline-success"><span class="job_id">1171 : Job ID 0a20d6eef3d34d3db9b5b0f843046616</span></button></div></a><div aria-labelledby="job_list___sub_heading_1171_1" data-parent="#job_list___sub_accordion_1171" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1171_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ != "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">timeout</pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1172"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1172_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1172_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1172_1"><button class="btn btn-outline-danger"><span class="job_id">1172 : Job ID 985dd0d5717647eeadc35eea64a1fc4e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1172_1" data-parent="#job_list___sub_accordion_1172" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1172_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename &lt; "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1173"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1173_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1173_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1173_1"><button class="btn btn-outline-danger"><span class="job_id">1173 : Job ID 02aaa50d4967426b94f108aac2e3b904</span></button></div></a><div aria-labelledby="job_list___sub_heading_1173_1" data-parent="#job_list___sub_accordion_1173" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1173_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 78), end pos: (1024, 80)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) &lt; 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1174"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1174_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1174_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1174_1"><button class="btn btn-outline-danger"><span class="job_id">1174 : Job ID bcb8632309eb4c49b3c4e3435df8e7ca</span></button></div></a><div aria-labelledby="job_list___sub_heading_1174_1" data-parent="#job_list___sub_accordion_1174" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1174_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ &lt; "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1175"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1175_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1175_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1175_1"><button class="btn btn-outline-danger"><span class="job_id">1175 : Job ID 177773b9ad4b4a8ba149f6e9b249c144</span></button></div></a><div aria-labelledby="job_list___sub_heading_1175_1" data-parent="#job_list___sub_accordion_1175" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1175_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename &lt;= "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1176"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1176_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1176_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1176_1"><button class="btn btn-outline-danger"><span class="job_id">1176 : Job ID 9f2e62a083224c94bdb998f6921200f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1176_1" data-parent="#job_list___sub_accordion_1176" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1176_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 78), end pos: (1024, 80)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) &lt;= 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1177"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1177_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1177_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1177_1"><button class="btn btn-outline-danger"><span class="job_id">1177 : Job ID f5184d270fae4ff4afaed48170de2d7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1177_1" data-parent="#job_list___sub_accordion_1177" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1177_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ &lt;= "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1178"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1178_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1178_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1178_1"><button class="btn btn-outline-success"><span class="job_id">1178 : Job ID 1459d59498264ad4a6ef9c6f06d17f2f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1178_1" data-parent="#job_list___sub_accordion_1178" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1178_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename &gt; "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1179"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1179_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1179_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1179_1"><button class="btn btn-outline-success"><span class="job_id">1179 : Job ID 2b24d5e76c9d4451b216288dcc3943f3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1179_1" data-parent="#job_list___sub_accordion_1179" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1179_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 78), end pos: (1024, 80)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) &gt; 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T201731712592Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T201732611896Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1180"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1180_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1180_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1180_1"><button class="btn btn-outline-success"><span class="job_id">1180 : Job ID 6fe974697b6f445382cc4e35c77398b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1180_1" data-parent="#job_list___sub_accordion_1180" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1180_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ &gt; "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">timeout</pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1181"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1181_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1181_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1181_1"><button class="btn btn-outline-success"><span class="job_id">1181 : Job ID b1be03f8d80344b6b58a7f37bf2b9309</span></button></div></a><div aria-labelledby="job_list___sub_heading_1181_1" data-parent="#job_list___sub_accordion_1181" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1181_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename &gt;= "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1182"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1182_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1182_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1182_1"><button class="btn btn-outline-success"><span class="job_id">1182 : Job ID 5737262981574a9ab60ab04b6c058619</span></button></div></a><div aria-labelledby="job_list___sub_heading_1182_1" data-parent="#job_list___sub_accordion_1182" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1182_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 78), end pos: (1024, 80)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) &gt;= 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 44 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1026 Watermarking produced no output for document 1 using method robust-xmp ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1183"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1183_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1183_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1183_1"><button class="btn btn-outline-success"><span class="job_id">1183 : Job ID b59a7144f84b4bfcb5bd9d02264f607a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1183_1" data-parent="#job_list___sub_accordion_1183" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1183_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ &gt;= "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">timeout</pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1184"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1184_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1184_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1184_1"><button class="btn btn-outline-danger"><span class="job_id">1184 : Job ID 59495ba61c3b48de909ac6a49a6f2bd4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1184_1" data-parent="#job_list___sub_accordion_1184" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1184_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename is "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:307 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:307: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? if not file or file.filename is "": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1185"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1185_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1185_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1185_1"><button class="btn btn-outline-danger"><span class="job_id">1185 : Job ID 019b8722a4ba4586bf3fc30dacd87f83</span></button></div></a><div aria-labelledby="job_list___sub_heading_1185_1" data-parent="#job_list___sub_accordion_1185" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1185_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ is "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:1264 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:1264: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? if __name__ is "__main__": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1186"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1186_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1186_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1186_1"><button class="btn btn-outline-success"><span class="job_id">1186 : Job ID 03ca90c9b16a48809b67a5a6b6669678</span></button></div></a><div aria-labelledby="job_list___sub_heading_1186_1" data-parent="#job_list___sub_accordion_1186" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1186_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 37), end pos: (307, 39)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file or file.filename is not "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:307 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:307: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="? if not file or file.filename is not "": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 24 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1187"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1187_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1187_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1187_1"><button class="btn btn-outline-success"><span class="job_id">1187 : Job ID 93e5ab3a96084dcc8a63a454ee88b086</span></button></div></a><div aria-labelledby="job_list___sub_heading_1187_1" data-parent="#job_list___sub_accordion_1187" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1187_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 12), end pos: (1264, 14)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if __name__ is not "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">timeout</pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1188"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1188_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1188_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1188_1"><button class="btn btn-outline-success"><span class="job_id">1188 : Job ID 6b86c9f6c7c544998c0c48202af07432</span></button></div></a><div aria-labelledby="job_list___sub_heading_1188_1" data-parent="#job_list___sub_accordion_1188" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1188_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype == "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1189"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1189_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1189_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1189_1"><button class="btn btn-outline-success"><span class="job_id">1189 : Job ID 1fbb906b3b344d84ae285de7304888b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1189_1" data-parent="#job_list___sub_accordion_1189" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1189_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head == b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125513112999Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125514164981Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 21.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1190"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1190_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1190_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1190_1"><button class="btn btn-outline-success"><span class="job_id">1190 : Job ID b4db7736960b4ef6bcfa3e35674ec7dc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1190_1" data-parent="#job_list___sub_accordion_1190" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1190_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header == b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ec792ef9cc44e59fa'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614ec792ef9cc44e59fa ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1191"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1191_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1191_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1191_1"><button class="btn btn-outline-danger"><span class="job_id">1191 : Job ID 2bdfb93f53424c8a81b5d03177925a38</span></button></div></a><div aria-labelledby="job_list___sub_heading_1191_1" data-parent="#job_list___sub_accordion_1191" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1191_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided == token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1192"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1192_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1192_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1192_1"><button class="btn btn-outline-danger"><span class="job_id">1192 : Job ID d89a8002b4284ef6a6ebd1963527f554</span></button></div></a><div aria-labelledby="job_list___sub_heading_1192_1" data-parent="#job_list___sub_accordion_1192" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1192_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype &lt; "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1193"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1193_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1193_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1193_1"><button class="btn btn-outline-danger"><span class="job_id">1193 : Job ID 84ee6a4f1d204053a4259e254391ad2c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1193_1" data-parent="#job_list___sub_accordion_1193" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1193_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head &lt; b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1194"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1194_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1194_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1194_1"><button class="btn btn-outline-danger"><span class="job_id">1194 : Job ID bf92656986f64d379d5fadbbaf473f16</span></button></div></a><div aria-labelledby="job_list___sub_heading_1194_1" data-parent="#job_list___sub_accordion_1194" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1194_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header &lt; b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1195"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1195_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1195_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1195_1"><button class="btn btn-outline-success"><span class="job_id">1195 : Job ID 23172aeb23544bad84595ed099d76a9c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1195_1" data-parent="#job_list___sub_accordion_1195" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1195_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided &lt; token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215056057368Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215056940948Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1196"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1196_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1196_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1196_1"><button class="btn btn-outline-success"><span class="job_id">1196 : Job ID 4cdfd86a684c45e28a8247eb7823849f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1196_1" data-parent="#job_list___sub_accordion_1196" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1196_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype &lt;= "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1197"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1197_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1197_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1197_1"><button class="btn btn-outline-success"><span class="job_id">1197 : Job ID 706968aa6ace46a7bda73e19935aaaf6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1197_1" data-parent="#job_list___sub_accordion_1197" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1197_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head &lt;= b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:645 Invalid PDF signature for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1198"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1198_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1198_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1198_1"><button class="btn btn-outline-success"><span class="job_id">1198 : Job ID 3e021d5f9bd14d9fbf7816723e65629d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1198_1" data-parent="#job_list___sub_accordion_1198" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1198_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header &lt;= b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e09f9ccf5ad01d9c0'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614e09f9ccf5ad01d9c0 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1199"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1199_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1199_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1199_1"><button class="btn btn-outline-success"><span class="job_id">1199 : Job ID d2bab49f49544f44a0c27ce376315813</span></button></div></a><div aria-labelledby="job_list___sub_heading_1199_1" data-parent="#job_list___sub_accordion_1199" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1199_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided &lt;= token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104732160997Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104732977529Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1200"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1200_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1200_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1200_1"><button class="btn btn-outline-danger"><span class="job_id">1200 : Job ID 33fb963bcc0b484ca7771ff8267cccea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1200_1" data-parent="#job_list___sub_accordion_1200" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1200_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype &gt; "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1201"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1201_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1201_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1201_1"><button class="btn btn-outline-danger"><span class="job_id">1201 : Job ID 63dbb819b9a944afae96e37e0f117707</span></button></div></a><div aria-labelledby="job_list___sub_heading_1201_1" data-parent="#job_list___sub_accordion_1201" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1201_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head &gt; b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1202"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1202_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1202_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1202_1"><button class="btn btn-outline-success"><span class="job_id">1202 : Job ID a7c26dc28fd049b3938b1af037061472</span></button></div></a><div aria-labelledby="job_list___sub_heading_1202_1" data-parent="#job_list___sub_accordion_1202" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1202_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header &gt; b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115808846626Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115809762031Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1203"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1203_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1203_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1203_1"><button class="btn btn-outline-danger"><span class="job_id">1203 : Job ID fdc0af96955749ea8a7a4ee187548c8d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1203_1" data-parent="#job_list___sub_accordion_1203" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1203_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided &gt; token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1204"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1204_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1204_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1204_1"><button class="btn btn-outline-success"><span class="job_id">1204 : Job ID ea230cc6c5de4fa1b28cead23d0f7c22</span></button></div></a><div aria-labelledby="job_list___sub_heading_1204_1" data-parent="#job_list___sub_accordion_1204" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1204_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype &gt;= "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1205"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1205_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1205_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1205_1"><button class="btn btn-outline-success"><span class="job_id">1205 : Job ID c9e6c045de924dd289d04aa2e8eb3e02</span></button></div></a><div aria-labelledby="job_list___sub_heading_1205_1" data-parent="#job_list___sub_accordion_1205" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1205_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head &gt;= b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001344653919Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001345597999Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1206"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1206_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1206_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1206_1"><button class="btn btn-outline-success"><span class="job_id">1206 : Job ID 6c1461f7b87348f183a3591266ab7e7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1206_1" data-parent="#job_list___sub_accordion_1206" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1206_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header &gt;= b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614edbe385cb703bbb57'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614edbe385cb703bbb57 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1207"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1207_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1207_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1207_1"><button class="btn btn-outline-danger"><span class="job_id">1207 : Job ID eb0a2a47d5334df2b9d8600ab2e1e25f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1207_1" data-parent="#job_list___sub_accordion_1207" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1207_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided &gt;= token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1208"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1208_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1208_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1208_1"><button class="btn btn-outline-danger"><span class="job_id">1208 : Job ID 8b2d951c35f4410c8a201de366fcb5a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1208_1" data-parent="#job_list___sub_accordion_1208" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1208_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype is "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:320 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:320: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? if file.mimetype is "application/pdf": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1209"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1209_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1209_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1209_1"><button class="btn btn-outline-danger"><span class="job_id">1209 : Job ID de46ca4d37e34be28ae9822de76818d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1209_1" data-parent="#job_list___sub_accordion_1209" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1209_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head is b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:643 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:643: SyntaxWarning: "is" with 'bytes' literal. Did you mean "=="? if head is b"%PDF-": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1210"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1210_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1210_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1210_1"><button class="btn btn-outline-danger"><span class="job_id">1210 : Job ID 5b70ff4385c74661a2400c36a8720135</span></button></div></a><div aria-labelledby="job_list___sub_heading_1210_1" data-parent="#job_list___sub_accordion_1210" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1210_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header is b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:737 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:737: SyntaxWarning: "is" with 'bytes' literal. Did you mean "=="? if header is b"%PDF-": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1211"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1211_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1211_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1211_1"><button class="btn btn-outline-danger"><span class="job_id">1211 : Job ID c951cca179814c09a148852d44173024</span></button></div></a><div aria-labelledby="job_list___sub_heading_1211_1" data-parent="#job_list___sub_accordion_1211" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1211_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided is token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1212"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1212_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1212_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1212_1"><button class="btn btn-outline-success"><span class="job_id">1212 : Job ID d1f7dec7266e4e478ae6b5842c5381a8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1212_1" data-parent="#job_list___sub_accordion_1212" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1212_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 25), end pos: (320, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if file.mimetype is not "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:320 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:320: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="? if file.mimetype is not "application/pdf": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 24 warnings in 20.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1213"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1213_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1213_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1213_1"><button class="btn btn-outline-success"><span class="job_id">1213 : Job ID b01ecc2ce31347049032b4f6f76a3ddd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1213_1" data-parent="#job_list___sub_accordion_1213" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1213_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 20), end pos: (643, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if head is not b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185108011321Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185108865036Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:643 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:643: SyntaxWarning: "is not" with 'bytes' literal. Did you mean "!="? if head is not b"%PDF-": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 24 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1214"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1214_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1214_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1214_1"><button class="btn btn-outline-success"><span class="job_id">1214 : Job ID a7625e2b720f49cd82fd4c00ab06c909</span></button></div></a><div aria-labelledby="job_list___sub_heading_1214_1" data-parent="#job_list___sub_accordion_1214" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1214_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 26), end pos: (737, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if header is not b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614eed04cd0f93cd974d'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614eed04cd0f93cd974d ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr server.py:737 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\server.py:737: SyntaxWarning: "is not" with 'bytes' literal. Did you mean "!="? if header is not b"%PDF-": &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 24 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1215"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1215_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1215_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1215_1"><button class="btn btn-outline-danger"><span class="job_id">1215 : Job ID 10fc90b787b048f5bd58b3e362d8446e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1215_1" data-parent="#job_list___sub_accordion_1215" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1215_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 20), end pos: (1243, 22)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if provided is not token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1216"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1216_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1216_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1216_1"><button class="btn btn-outline-danger"><span class="job_id">1216 : Job ID 192a3815f0dc42dbb40de26d17eacff1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1216_1" data-parent="#job_list___sub_accordion_1216" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1216_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 54), end pos: (462, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id == 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1217"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1217_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1217_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1217_1"><button class="btn btn-outline-danger"><span class="job_id">1217 : Job ID 082263840fee4ea6859b2aea67fa1ef1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1217_1" data-parent="#job_list___sub_accordion_1217" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1217_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 46), end pos: (469, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id == 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1218"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1218_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1218_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1218_1"><button class="btn btn-outline-danger"><span class="job_id">1218 : Job ID 107d8ad4c06c40b3b07cca0440b3fe20</span></button></div></a><div aria-labelledby="job_list___sub_heading_1218_1" data-parent="#job_list___sub_accordion_1218" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1218_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 46), end pos: (583, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id == 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1219"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1219_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1219_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1219_1"><button class="btn btn-outline-success"><span class="job_id">1219 : Job ID e16bb9f71d7e433ba7c37918203f41ee</span></button></div></a><div aria-labelledby="job_list___sub_heading_1219_1" data-parent="#job_list___sub_accordion_1219" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1219_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 18), end pos: (823, 20)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id == 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193233515153Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193234423473Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1220"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1220_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1220_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1220_1"><button class="btn btn-outline-danger"><span class="job_id">1220 : Job ID 9aed03511cc74c6e85df9593e73e252b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1220_1" data-parent="#job_list___sub_accordion_1220" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1220_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 22), end pos: (937, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id == 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1221"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1221_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1221_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1221_1"><button class="btn btn-outline-danger"><span class="job_id">1221 : Job ID 29449367d82d4602859d539711f36763</span></button></div></a><div aria-labelledby="job_list___sub_heading_1221_1" data-parent="#job_list___sub_accordion_1221" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1221_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 22), end pos: (1172, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id == 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1222"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1222_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1222_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1222_1"><button class="btn btn-outline-success"><span class="job_id">1222 : Job ID 1caa5db7905f453eac7c7ef5e4a80926</span></button></div></a><div aria-labelledby="job_list___sub_heading_1222_1" data-parent="#job_list___sub_accordion_1222" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1222_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 54), end pos: (462, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id != 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1223"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1223_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1223_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1223_1"><button class="btn btn-outline-success"><span class="job_id">1223 : Job ID 0a0a4a48269c4ab083c109d3e90a1d22</span></button></div></a><div aria-labelledby="job_list___sub_heading_1223_1" data-parent="#job_list___sub_accordion_1223" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1223_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 46), end pos: (469, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id != 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1224"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1224_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1224_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1224_1"><button class="btn btn-outline-success"><span class="job_id">1224 : Job ID 004296e6a64c435a9fff5a758404432f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1224_1" data-parent="#job_list___sub_accordion_1224" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1224_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 46), end pos: (583, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id != 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1225"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1225_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1225_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1225_1"><button class="btn btn-outline-success"><span class="job_id">1225 : Job ID c24ecc82900c4381ab4ddffdaabba0e6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1225_1" data-parent="#job_list___sub_accordion_1225" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1225_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 18), end pos: (823, 20)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id != 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1226"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1226_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1226_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1226_1"><button class="btn btn-outline-success"><span class="job_id">1226 : Job ID c50f8e23808a45db9b2140cb98c20982</span></button></div></a><div aria-labelledby="job_list___sub_heading_1226_1" data-parent="#job_list___sub_accordion_1226" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1226_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 22), end pos: (937, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id != 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1227"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1227_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1227_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1227_1"><button class="btn btn-outline-success"><span class="job_id">1227 : Job ID b26bc558daa744779f6de596bd6c5aa7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1227_1" data-parent="#job_list___sub_accordion_1227" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1227_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 22), end pos: (1172, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id != 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1228"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1228_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1228_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1228_1"><button class="btn btn-outline-danger"><span class="job_id">1228 : Job ID 5b8268ef4bed42a1ae698e506c0576a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1228_1" data-parent="#job_list___sub_accordion_1228" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1228_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 54), end pos: (462, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt; 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1229"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1229_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1229_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1229_1"><button class="btn btn-outline-danger"><span class="job_id">1229 : Job ID b903f513927a44aeb3a8e2f77bb9c702</span></button></div></a><div aria-labelledby="job_list___sub_heading_1229_1" data-parent="#job_list___sub_accordion_1229" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1229_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 46), end pos: (469, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt; 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1230"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1230_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1230_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1230_1"><button class="btn btn-outline-danger"><span class="job_id">1230 : Job ID 62b73107ef9a4882bb1ef7139576d587</span></button></div></a><div aria-labelledby="job_list___sub_heading_1230_1" data-parent="#job_list___sub_accordion_1230" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1230_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 46), end pos: (583, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt; 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1231"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1231_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1231_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1231_1"><button class="btn btn-outline-success"><span class="job_id">1231 : Job ID 5576f507e52f4e73808fdbe67bfe6fbe</span></button></div></a><div aria-labelledby="job_list___sub_heading_1231_1" data-parent="#job_list___sub_accordion_1231" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1231_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 18), end pos: (823, 20)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt; 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") assert resp_deletion.status_code == 404 #Test missing id resp = client.delete("/api/delete-document") &gt; assert resp.status_code == 400 E assert 404 == 400 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:464: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=2 WARNING server:server.py:850 Document not found or access denied for deletion id=0 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 400 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1232"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1232_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1232_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1232_1"><button class="btn btn-outline-danger"><span class="job_id">1232 : Job ID df08c12f5c84494fb643f74299a99355</span></button></div></a><div aria-labelledby="job_list___sub_heading_1232_1" data-parent="#job_list___sub_accordion_1232" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1232_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 22), end pos: (937, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt; 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1233"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1233_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1233_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1233_1"><button class="btn btn-outline-danger"><span class="job_id">1233 : Job ID c7c0d4e960ec4c6682d7eeaa05df6761</span></button></div></a><div aria-labelledby="job_list___sub_heading_1233_1" data-parent="#job_list___sub_accordion_1233" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1233_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 22), end pos: (1172, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt; 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1234"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1234_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1234_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1234_1"><button class="btn btn-outline-success"><span class="job_id">1234 : Job ID d46f4af61bc74f0cb247c46413d355fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1234_1" data-parent="#job_list___sub_accordion_1234" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1234_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 54), end pos: (462, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt; 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1235"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1235_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1235_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1235_1"><button class="btn btn-outline-success"><span class="job_id">1235 : Job ID 0b86a644b1ce4459b12e7fe53c91a2f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1235_1" data-parent="#job_list___sub_accordion_1235" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1235_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 46), end pos: (469, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt; 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1236"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1236_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1236_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1236_1"><button class="btn btn-outline-success"><span class="job_id">1236 : Job ID 95c3dd493ffc4cbc96c8c7bef550ed40</span></button></div></a><div aria-labelledby="job_list___sub_heading_1236_1" data-parent="#job_list___sub_accordion_1236" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1236_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 46), end pos: (583, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt; 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1237"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1237_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1237_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1237_1"><button class="btn btn-outline-success"><span class="job_id">1237 : Job ID 8e8526bee869411c99dfd9acf0f75025</span></button></div></a><div aria-labelledby="job_list___sub_heading_1237_1" data-parent="#job_list___sub_accordion_1237" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1237_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 18), end pos: (823, 20)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt; 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1238"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1238_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1238_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1238_1"><button class="btn btn-outline-success"><span class="job_id">1238 : Job ID e48a70923b6a42828986b43deec2bb0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1238_1" data-parent="#job_list___sub_accordion_1238" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1238_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 22), end pos: (937, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt; 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1239"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1239_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1239_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1239_1"><button class="btn btn-outline-success"><span class="job_id">1239 : Job ID 62aa15ac2c554a54b53a07410c26b8fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1239_1" data-parent="#job_list___sub_accordion_1239" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1239_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 22), end pos: (1172, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt; 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1240"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1240_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1240_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1240_1"><button class="btn btn-outline-success"><span class="job_id">1240 : Job ID a4e49bd605b14116bea2d914495de930</span></button></div></a><div aria-labelledby="job_list___sub_heading_1240_1" data-parent="#job_list___sub_accordion_1240" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1240_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 54), end pos: (462, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1241"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1241_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1241_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1241_1"><button class="btn btn-outline-success"><span class="job_id">1241 : Job ID 992e2e146c924d878f6def490fefdb38</span></button></div></a><div aria-labelledby="job_list___sub_heading_1241_1" data-parent="#job_list___sub_accordion_1241" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1241_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 46), end pos: (469, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1242"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1242_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1242_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1242_1"><button class="btn btn-outline-success"><span class="job_id">1242 : Job ID 058dfeab73cc4935b98dd61629fe618f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1242_1" data-parent="#job_list___sub_accordion_1242" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1242_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 46), end pos: (583, 48)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &gt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1243"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1243_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1243_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1243_1"><button class="btn btn-outline-success"><span class="job_id">1243 : Job ID caa55e7bc5144eeca6b50268da82b1b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1243_1" data-parent="#job_list___sub_accordion_1243" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1243_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 18), end pos: (823, 20)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1244"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1244_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1244_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1244_1"><button class="btn btn-outline-success"><span class="job_id">1244 : Job ID eb7038c7465a430db6b6d96e52d12688</span></button></div></a><div aria-labelledby="job_list___sub_heading_1244_1" data-parent="#job_list___sub_accordion_1244" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1244_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 22), end pos: (937, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1245"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1245_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1245_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1245_1"><button class="btn btn-outline-success"><span class="job_id">1245 : Job ID 2cb66918023549aaae8d2219d466e769</span></button></div></a><div aria-labelledby="job_list___sub_heading_1245_1" data-parent="#job_list___sub_accordion_1245" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1245_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 22), end pos: (1172, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &gt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1246"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1246_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1246_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1246_1"><button class="btn btn-outline-danger"><span class="job_id">1246 : Job ID 86813badaac24117ab7f58937bb58878</span></button></div></a><div aria-labelledby="job_list___sub_heading_1246_1" data-parent="#job_list___sub_accordion_1246" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1246_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 22), end pos: (188, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) == 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1247"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1247_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1247_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1247_1"><button class="btn btn-outline-danger"><span class="job_id">1247 : Job ID 99ac2a42aca44eaeb5d05d9fa59d4d24</span></button></div></a><div aria-labelledby="job_list___sub_heading_1247_1" data-parent="#job_list___sub_accordion_1247" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1247_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 42), end pos: (188, 43)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) == 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1248"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1248_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1248_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1248_1"><button class="btn btn-outline-success"><span class="job_id">1248 : Job ID 5598cac0f01842e79f9deee266606fc3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1248_1" data-parent="#job_list___sub_accordion_1248" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1248_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length == MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x0000022FF04E70C0&gt;('id') E + where &lt;built-in method get of dict object at 0x0000022FF04E70C0&gt; = {'creation': '2025-10-17T10:48:47.499642', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1249"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1249_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1249_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1249_1"><button class="btn btn-outline-danger"><span class="job_id">1249 : Job ID 11e52da230d445bb8d1c07b24b8dd8fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1249_1" data-parent="#job_list___sub_accordion_1249" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1249_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id == MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1250"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1250_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1250_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1250_1"><button class="btn btn-outline-danger"><span class="job_id">1250 : Job ID b526c1b11f4b40849429b3d8b2bbb8ef</span></button></div></a><div aria-labelledby="job_list___sub_heading_1250_1" data-parent="#job_list___sub_accordion_1250" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1250_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id == MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1251"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1251_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1251_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1251_1"><button class="btn btn-outline-danger"><span class="job_id">1251 : Job ID b3d8cf1b447944e3a94d06a5abd0101f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1251_1" data-parent="#job_list___sub_accordion_1251" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1251_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id == MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1252"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1252_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1252_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1252_1"><button class="btn btn-outline-danger"><span class="job_id">1252 : Job ID 6e769ea5413e49a9877b54ac3e573fcf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1252_1" data-parent="#job_list___sub_accordion_1252" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1252_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id == MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1253"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1253_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1253_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1253_1"><button class="btn btn-outline-danger"><span class="job_id">1253 : Job ID 86ca430289774501ab5cf1ec45634edd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1253_1" data-parent="#job_list___sub_accordion_1253" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1253_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id == MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1254"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1254_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1254_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1254_1"><button class="btn btn-outline-danger"><span class="job_id">1254 : Job ID 6dad5c6e19724b6e90f35f721419a3b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1254_1" data-parent="#job_list___sub_accordion_1254" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1254_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id == MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1255"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1255_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1255_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1255_1"><button class="btn btn-outline-success"><span class="job_id">1255 : Job ID 9d2ebdbf16e74fc283b25b05f898b985</span></button></div></a><div aria-labelledby="job_list___sub_heading_1255_1" data-parent="#job_list___sub_accordion_1255" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1255_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 22), end pos: (188, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) != 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235851201914Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235852034732Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1256"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1256_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1256_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1256_1"><button class="btn btn-outline-success"><span class="job_id">1256 : Job ID 8c1b46be3e8349c992307d8f98ad4318</span></button></div></a><div aria-labelledby="job_list___sub_heading_1256_1" data-parent="#job_list___sub_accordion_1256" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1256_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 42), end pos: (188, 43)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) != 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220426574546Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220427448540Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1257"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1257_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1257_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1257_1"><button class="btn btn-outline-danger"><span class="job_id">1257 : Job ID c42ad653f6f24decbe80edb512042f2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1257_1" data-parent="#job_list___sub_accordion_1257" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1257_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length != MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1258"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1258_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1258_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1258_1"><button class="btn btn-outline-success"><span class="job_id">1258 : Job ID b9f4859de46b4632834cdb7269fafece</span></button></div></a><div aria-labelledby="job_list___sub_heading_1258_1" data-parent="#job_list___sub_accordion_1258" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1258_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id != MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1259"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1259_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1259_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1259_1"><button class="btn btn-outline-success"><span class="job_id">1259 : Job ID cede7bbfbeb8435eb5c44cb0af026ba8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1259_1" data-parent="#job_list___sub_accordion_1259" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1259_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id != MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1260"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1260_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1260_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1260_1"><button class="btn btn-outline-success"><span class="job_id">1260 : Job ID 12ea90f85f644ec1b6f8c6b229de3fcd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1260_1" data-parent="#job_list___sub_accordion_1260" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1260_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id != MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1261"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1261_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1261_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1261_1"><button class="btn btn-outline-success"><span class="job_id">1261 : Job ID 197127fc8a194f688f03b59476743c32</span></button></div></a><div aria-labelledby="job_list___sub_heading_1261_1" data-parent="#job_list___sub_accordion_1261" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1261_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id != MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1262"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1262_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1262_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1262_1"><button class="btn btn-outline-success"><span class="job_id">1262 : Job ID f034b8d37874413c89be1154eea0215c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1262_1" data-parent="#job_list___sub_accordion_1262" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1262_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id != MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1263"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1263_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1263_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1263_1"><button class="btn btn-outline-success"><span class="job_id">1263 : Job ID 20284f814673424182b83bccabf2c30d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1263_1" data-parent="#job_list___sub_accordion_1263" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1263_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id != MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1264"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1264_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1264_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1264_1"><button class="btn btn-outline-success"><span class="job_id">1264 : Job ID 0e6b604e1f664e24852d3d0bdcb80725</span></button></div></a><div aria-labelledby="job_list___sub_heading_1264_1" data-parent="#job_list___sub_accordion_1264" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1264_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 22), end pos: (188, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &lt; 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180106733195Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180107596905Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1265"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1265_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1265_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1265_1"><button class="btn btn-outline-success"><span class="job_id">1265 : Job ID c30b71bbf458457dbbe632e68ba196d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1265_1" data-parent="#job_list___sub_accordion_1265" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1265_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 42), end pos: (188, 43)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) &lt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113723881746Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113724721980Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 19.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1266"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1266_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1266_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1266_1"><button class="btn btn-outline-success"><span class="job_id">1266 : Job ID 1e89c231f2284adba1007246ab7ebc0b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1266_1" data-parent="#job_list___sub_accordion_1266" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1266_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length &lt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T171803291392Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T171804163367Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1267"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1267_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1267_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1267_1"><button class="btn btn-outline-success"><span class="job_id">1267 : Job ID bcd1ee741f5b430bb6320d72fa097780</span></button></div></a><div aria-labelledby="job_list___sub_heading_1267_1" data-parent="#job_list___sub_accordion_1267" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1267_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001514047613Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001514881463Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1268"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1268_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1268_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1268_1"><button class="btn btn-outline-success"><span class="job_id">1268 : Job ID b1d680b00c0e400fad59f0475aebfa0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1268_1" data-parent="#job_list___sub_accordion_1268" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1268_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1269"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1269_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1269_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1269_1"><button class="btn btn-outline-success"><span class="job_id">1269 : Job ID f150bb31912848918c077de7fe58d16a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1269_1" data-parent="#job_list___sub_accordion_1269" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1269_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215615459011Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215616264477Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1270"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1270_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1270_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1270_1"><button class="btn btn-outline-success"><span class="job_id">1270 : Job ID 7d70bdb527e744baba60100071042810</span></button></div></a><div aria-labelledby="job_list___sub_heading_1270_1" data-parent="#job_list___sub_accordion_1270" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1270_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1271"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1271_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1271_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1271_1"><button class="btn btn-outline-success"><span class="job_id">1271 : Job ID 1bc84a5ab39944ceb4aca05e92d24132</span></button></div></a><div aria-labelledby="job_list___sub_heading_1271_1" data-parent="#job_list___sub_accordion_1271" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1271_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1272"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1272_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1272_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1272_1"><button class="btn btn-outline-success"><span class="job_id">1272 : Job ID 16cab1b594d04ed6a937a0e975fe2e8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1272_1" data-parent="#job_list___sub_accordion_1272" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1272_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1273"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1273_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1273_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1273_1"><button class="btn btn-outline-success"><span class="job_id">1273 : Job ID 87b8ab0eea4643a4bdcf9b53a9cf842d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1273_1" data-parent="#job_list___sub_accordion_1273" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1273_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 22), end pos: (188, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &lt;= 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T212523809522Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T212524679729Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1274"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1274_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1274_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1274_1"><button class="btn btn-outline-success"><span class="job_id">1274 : Job ID 1890328b62a642c09688783e35d757de</span></button></div></a><div aria-labelledby="job_list___sub_heading_1274_1" data-parent="#job_list___sub_accordion_1274" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1274_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 42), end pos: (188, 43)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) &lt;= 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001300354201Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001301242501Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1275"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1275_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1275_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1275_1"><button class="btn btn-outline-success"><span class="job_id">1275 : Job ID e2980760a5254889ae36e235d6ccc43b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1275_1" data-parent="#job_list___sub_accordion_1275" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1275_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length &lt;= MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204015284286Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T204016185806Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1276"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1276_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1276_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1276_1"><button class="btn btn-outline-success"><span class="job_id">1276 : Job ID c892553d630a4519a8f5dd369f5a24fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1276_1" data-parent="#job_list___sub_accordion_1276" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1276_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt;= MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T142232872679Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T142233695339Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1277"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1277_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1277_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1277_1"><button class="btn btn-outline-success"><span class="job_id">1277 : Job ID f5e9c6dcf9014300878f7b0345f3ab45</span></button></div></a><div aria-labelledby="job_list___sub_heading_1277_1" data-parent="#job_list___sub_accordion_1277" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1277_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt;= MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1278"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1278_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1278_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1278_1"><button class="btn btn-outline-success"><span class="job_id">1278 : Job ID e2284ed47dd8454cb8c5d7e381429c3f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1278_1" data-parent="#job_list___sub_accordion_1278" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1278_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &lt;= MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231004660843Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231005548983Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1279"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1279_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1279_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1279_1"><button class="btn btn-outline-success"><span class="job_id">1279 : Job ID f8be82e68f5d40efbd1dea9e4a4153ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_1279_1" data-parent="#job_list___sub_accordion_1279" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1279_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt;= MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1280"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1280_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1280_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1280_1"><button class="btn btn-outline-success"><span class="job_id">1280 : Job ID fb28b670accb4dbd9a3de52c261fbc88</span></button></div></a><div aria-labelledby="job_list___sub_heading_1280_1" data-parent="#job_list___sub_accordion_1280" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1280_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt;= MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1281"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1281_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1281_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1281_1"><button class="btn btn-outline-success"><span class="job_id">1281 : Job ID 9ffc190d3f9a4ad4976ef4777169a17c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1281_1" data-parent="#job_list___sub_accordion_1281" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1281_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &lt;= MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1282"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1282_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1282_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1282_1"><button class="btn btn-outline-danger"><span class="job_id">1282 : Job ID bac89ad8e56b446b9db34c06826fa030</span></button></div></a><div aria-labelledby="job_list___sub_heading_1282_1" data-parent="#job_list___sub_accordion_1282" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1282_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 22), end pos: (188, 23)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt;= 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1283"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1283_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1283_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1283_1"><button class="btn btn-outline-success"><span class="job_id">1283 : Job ID e6d115b9717948a1a53d093fa8d9be59</span></button></div></a><div aria-labelledby="job_list___sub_heading_1283_1" data-parent="#job_list___sub_accordion_1283" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1283_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 42), end pos: (188, 43)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) &gt;= 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200114739956Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200115600361Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1284"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1284_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1284_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1284_1"><button class="btn btn-outline-danger"><span class="job_id">1284 : Job ID 636cb0782b694e4690569b50aa2ec79e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1284_1" data-parent="#job_list___sub_accordion_1284" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1284_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length &gt;= MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1285"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1285_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1285_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1285_1"><button class="btn btn-outline-danger"><span class="job_id">1285 : Job ID f09c5a58c3884bd489216ce478f0a87f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1285_1" data-parent="#job_list___sub_accordion_1285" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1285_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &gt;= MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1286"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1286_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1286_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1286_1"><button class="btn btn-outline-danger"><span class="job_id">1286 : Job ID f7cd93fbbd974c3e912c1c08338dd97a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1286_1" data-parent="#job_list___sub_accordion_1286" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1286_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &gt;= MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1287"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1287_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1287_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1287_1"><button class="btn btn-outline-danger"><span class="job_id">1287 : Job ID 4dcb4eb105f74604b008791902e5d2cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1287_1" data-parent="#job_list___sub_accordion_1287" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1287_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id &gt;= MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1288"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1288_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1288_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1288_1"><button class="btn btn-outline-danger"><span class="job_id">1288 : Job ID ff60244603dc4a11a94e313be60050d7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1288_1" data-parent="#job_list___sub_accordion_1288" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1288_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &gt;= MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1289"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1289_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1289_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1289_1"><button class="btn btn-outline-danger"><span class="job_id">1289 : Job ID 458ed21060214dcbae868ab458718f27</span></button></div></a><div aria-labelledby="job_list___sub_heading_1289_1" data-parent="#job_list___sub_accordion_1289" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1289_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &gt;= MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1290"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1290_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1290_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1290_1"><button class="btn btn-outline-danger"><span class="job_id">1290 : Job ID efcb2b89814b4afab3e30f2ac5690977</span></button></div></a><div aria-labelledby="job_list___sub_heading_1290_1" data-parent="#job_list___sub_accordion_1290" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1290_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id &gt;= MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1291"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1291_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1291_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1291_1"><button class="btn btn-outline-success"><span class="job_id">1291 : Job ID f5b2d2dd9613403e8eee1d444baf96d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1291_1" data-parent="#job_list___sub_accordion_1291" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1291_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length is MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T002355290285Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T002356150673Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1292"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1292_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1292_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1292_1"><button class="btn btn-outline-success"><span class="job_id">1292 : Job ID 69e1e211211d4457874638b386205560</span></button></div></a><div aria-labelledby="job_list___sub_heading_1292_1" data-parent="#job_list___sub_accordion_1292" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1292_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200009558923Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T200010451432Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1293"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1293_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1293_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1293_1"><button class="btn btn-outline-danger"><span class="job_id">1293 : Job ID b186948ef8304119924e1602e579a78f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1293_1" data-parent="#job_list___sub_accordion_1293" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1293_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1294"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1294_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1294_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1294_1"><button class="btn btn-outline-danger"><span class="job_id">1294 : Job ID de755479471a460ab84b0c23bc2f5aa0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1294_1" data-parent="#job_list___sub_accordion_1294" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1294_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1295"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1295_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1295_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1295_1"><button class="btn btn-outline-danger"><span class="job_id">1295 : Job ID fa5a219498424747bf76a63fb703a168</span></button></div></a><div aria-labelledby="job_list___sub_heading_1295_1" data-parent="#job_list___sub_accordion_1295" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1295_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1296"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1296_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1296_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1296_1"><button class="btn btn-outline-success"><span class="job_id">1296 : Job ID bae71907b8c14cc8a828d2adecdabf6f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1296_1" data-parent="#job_list___sub_accordion_1296" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1296_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123950354548Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123951209385Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1297"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1297_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1297_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1297_1"><button class="btn btn-outline-danger"><span class="job_id">1297 : Job ID e2654072dc2446fea22f3c8b1d4980cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1297_1" data-parent="#job_list___sub_accordion_1297" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1297_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Is, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1298"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1298_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1298_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1298_1"><button class="btn btn-outline-danger"><span class="job_id">1298 : Job ID 14576686879d455798f70cbbb43d5dd1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1298_1" data-parent="#job_list___sub_accordion_1298" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1298_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 55), end pos: (314, 56)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length and file.content_length is not MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1299"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1299_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1299_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1299_1"><button class="btn btn-outline-success"><span class="job_id">1299 : Job ID 0d3d883e206a45faaddd0da478f8d846</span></button></div></a><div aria-labelledby="job_list___sub_heading_1299_1" data-parent="#job_list___sub_accordion_1299" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1299_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 74), end pos: (462, 75)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is not MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1300"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1300_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1300_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1300_1"><button class="btn btn-outline-success"><span class="job_id">1300 : Job ID b2d2897ec48f4fbe857e0d400bbf4f59</span></button></div></a><div aria-labelledby="job_list___sub_heading_1300_1" data-parent="#job_list___sub_accordion_1300" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1300_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 66), end pos: (469, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is not MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1301"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1301_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1301_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1301_1"><button class="btn btn-outline-success"><span class="job_id">1301 : Job ID e428b0a295564b26abee312b63af70fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1301_1" data-parent="#job_list___sub_accordion_1301" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1301_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 66), end pos: (583, 67)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 or document_id is not MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1302"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1302_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1302_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1302_1"><button class="btn btn-outline-success"><span class="job_id">1302 : Job ID 8ee0f3932a4c4e7a8e009631d1957485</span></button></div></a><div aria-labelledby="job_list___sub_heading_1302_1" data-parent="#job_list___sub_accordion_1302" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1302_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 33), end pos: (823, 34)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is not MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1303"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1303_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1303_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1303_1"><button class="btn btn-outline-success"><span class="job_id">1303 : Job ID 87f5ce0112404c869370fd7e2d645ee4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1303_1" data-parent="#job_list___sub_accordion_1303" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1303_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 37), end pos: (937, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is not MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1304"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1304_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1304_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1304_1"><button class="btn btn-outline-success"><span class="job_id">1304 : Job ID f9f1321237fe4da18c4d63a08a085fb5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1304_1" data-parent="#job_list___sub_accordion_1304" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1304_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 37), end pos: (1172, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_IsNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 or doc_id is not MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1305"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1305_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1305_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1305_1"><button class="btn btn-outline-danger"><span class="job_id">1305 : Job ID a40ec4e7c64c4c58b0738896f81066b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1305_1" data-parent="#job_list___sub_accordion_1305" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1305_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable == False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1306"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1306_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1306_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1306_1"><button class="btn btn-outline-success"><span class="job_id">1306 : Job ID aa80dd8c96684a54b963708e2335136c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1306_1" data-parent="#job_list___sub_accordion_1306" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1306_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable != False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1307"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1307_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1307_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1307_1"><button class="btn btn-outline-danger"><span class="job_id">1307 : Job ID f9f403a6e7ca4dd1b5be76118e290220</span></button></div></a><div aria-labelledby="job_list___sub_heading_1307_1" data-parent="#job_list___sub_accordion_1307" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1307_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable &lt; False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1308"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1308_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1308_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1308_1"><button class="btn btn-outline-danger"><span class="job_id">1308 : Job ID 3338673e8f83437b9781b40ca90b0c1c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1308_1" data-parent="#job_list___sub_accordion_1308" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1308_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable &lt;= False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1309"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1309_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1309_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1309_1"><button class="btn btn-outline-success"><span class="job_id">1309 : Job ID 2e6983a5d2e942a48178b2ca27017c34</span></button></div></a><div aria-labelledby="job_list___sub_heading_1309_1" data-parent="#job_list___sub_accordion_1309" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1309_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable &gt; False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1310"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1310_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1310_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1310_1"><button class="btn btn-outline-success"><span class="job_id">1310 : Job ID e32e89a38fd74d21a9e4369e5166ba27</span></button></div></a><div aria-labelledby="job_list___sub_heading_1310_1" data-parent="#job_list___sub_accordion_1310" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1310_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable &gt;= False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1311"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1311_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1311_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1311_1"><button class="btn btn-outline-success"><span class="job_id">1311 : Job ID 6e85016e0ec049cb82bafbb624eaeafe</span></button></div></a><div aria-labelledby="job_list___sub_heading_1311_1" data-parent="#job_list___sub_accordion_1311" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1311_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=74" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (74, 15), end pos: (74, 17)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -71,7 +71,7 @@ def get_engine(): eng = app.config.get("_ENGINE") - if eng is None: + if eng is not None: try: eng = create_engine(db_url(), pool_pre_ping=True, future=True) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: 'NoneType' object has no attribute 'begin' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: 'NoneType' object has no attribute 'connect' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T234949395839Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document 'NoneType' object has no attribute 'connect' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T234950118113Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: 'NoneType' object has no attribute 'connect' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: 'NoneType' object has no attribute 'begin' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 19.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1312"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1312_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1312_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1312_1"><button class="btn btn-outline-success"><span class="job_id">1312 : Job ID 11a4b59df67d4e768c4f6839169cee45</span></button></div></a><div aria-labelledby="job_list___sub_heading_1312_1" data-parent="#job_list___sub_accordion_1312" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1312_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=458" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (458, 23), end pos: (458, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -455,7 +455,7 @@ @require_auth def list_versions(document_id: int | None = None): # Input validation - if document_id is None: + if document_id is not None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1313"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1313_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1313_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1313_1"><button class="btn btn-outline-success"><span class="job_id">1313 : Job ID 0529a5c5b274442398642d17972f63d6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1313_1" data-parent="#job_list___sub_accordion_1313" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1313_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 31), end pos: (462, 33)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is not None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1314"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1314_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1314_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1314_1"><button class="btn btn-outline-success"><span class="job_id">1314 : Job ID 3a698362ac9a478cb9b16fd1a2851191</span></button></div></a><div aria-labelledby="job_list___sub_heading_1314_1" data-parent="#job_list___sub_accordion_1314" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1314_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 23), end pos: (469, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is not None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1315"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1315_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1315_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1315_1"><button class="btn btn-outline-success"><span class="job_id">1315 : Job ID d7b0e4228e51458ea65615b7f61a9598</span></button></div></a><div aria-labelledby="job_list___sub_heading_1315_1" data-parent="#job_list___sub_accordion_1315" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1315_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=575" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (575, 23), end pos: (575, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -572,7 +572,7 @@ @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= - if document_id is None: + if document_id is not None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1316"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1316_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1316_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1316_1"><button class="btn btn-outline-success"><span class="job_id">1316 : Job ID 14b7e58d0d5842a7bb3642bd320cd20d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1316_1" data-parent="#job_list___sub_accordion_1316" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1316_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 23), end pos: (583, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is not None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1317"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1317_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1317_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1317_1"><button class="btn btn-outline-success"><span class="job_id">1317 : Job ID 0e9b02a5c36b40eda5b63bd8460b5eb4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1317_1" data-parent="#job_list___sub_accordion_1317" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1317_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=813" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (813, 23), end pos: (813, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -810,7 +810,7 @@ or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) - if document_id is None: + if document_id is not None: app.logger.warning("Document id required for deletion") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:814 Document id required for deletion ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1318"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1318_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1318_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1318_1"><button class="btn btn-outline-success"><span class="job_id">1318 : Job ID 5d07e19bf6da4c5eb292ce03d67d5152</span></button></div></a><div aria-labelledby="job_list___sub_heading_1318_1" data-parent="#job_list___sub_accordion_1318" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1318_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=933" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (933, 22), end pos: (933, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -930,7 +930,7 @@ # validate input try: - if doc_id is None: + if doc_id is not None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1319"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1319_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1319_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1319_1"><button class="btn btn-outline-success"><span class="job_id">1319 : Job ID 368647fb62044d25b3592d0f84223e72</span></button></div></a><div aria-labelledby="job_list___sub_heading_1319_1" data-parent="#job_list___sub_accordion_1319" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1319_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 26), end pos: (997, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable is not False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1320"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1320_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1320_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1320_1"><button class="btn btn-outline-success"><span class="job_id">1320 : Job ID 8123599106c140ae91d98390ef85557e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1320_1" data-parent="#job_list___sub_accordion_1320" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1320_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1168" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1168, 22), end pos: (1168, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1165,7 +1165,7 @@ # validate input try: - if doc_id is None: + if doc_id is not None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1321"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1321_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1321_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1321_1"><button class="btn btn-outline-success"><span class="job_id">1321 : Job ID 81822fee5c0a4b5f97ab1bc3e0d363c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1321_1" data-parent="#job_list___sub_accordion_1321" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1321_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (84, 19), end pos: (84, 25)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -81,7 +81,7 @@ return eng # --- RMAP initialization (skippable in tests) --- - if RMAPHandler is not None: + if RMAPHandler is None: try: RMAPHandler(app, str(app.config["STORAGE_DIR"]), get_engine) except Exception as e: # pragma: no cover - defensive; don't fail app</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1322"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1322_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1322_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1322_1"><button class="btn btn-outline-danger"><span class="job_id">1322 : Job ID c2c1d9009c164981bd39d9d6fa2bbc65</span></button></div></a><div aria-labelledby="job_list___sub_heading_1322_1" data-parent="#job_list___sub_accordion_1322" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1322_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=144" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (144, 22), end pos: (144, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -141,7 +141,7 @@ # capture request size if content-length header present try: cl = request.content_length - if cl is not None: + if cl is None: observe_request_size(request.method, route, cl) except Exception as exc: # pragma: no cover - soft fail app.logger.warning("Request size capture failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1323"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1323_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1323_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1323_1"><button class="btn btn-outline-danger"><span class="job_id">1323 : Job ID 48590146632e44e780a853f68154b69c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1323_1" data-parent="#job_list___sub_accordion_1323" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1323_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=155" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (155, 21), end pos: (155, 27)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -152,7 +152,7 @@ def _tatou_after(resp): try: start = getattr(request, "_tatou_start", None) - if start is not None: + if start is None: dur = time.time() - start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1324"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1324_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1324_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1324_1"><button class="btn btn-outline-success"><span class="job_id">1324 : Job ID 2a0274d78e0040249775427a9ec555e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1324_1" data-parent="#job_list___sub_accordion_1324" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1324_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (37, 3), end pos: (37, 6)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -34,7 +34,7 @@ MAX_DB_INT = (2**63) - 1 RMAPHandler = None # default -if not os.environ.get("TATOU_TEST_DISABLE_RMAP"): +if os.environ.get("TATOU_TEST_DISABLE_RMAP"): try: # Allow tests to disable RMAP dependency via env var from rmap_handler import RMAPHandler as _RMAPHandler # type: ignore </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1325"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1325_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1325_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1325_1"><button class="btn btn-outline-danger"><span class="job_id">1325 : Job ID ee7f57380dc94789919ad9b76c2b8f3e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1325_1" data-parent="#job_list___sub_accordion_1325" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1325_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (105, 15), end pos: (105, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -102,7 +102,7 @@ g.user = {"id": 1, "login": "username", "email": "user@email.se"} return f(*args, **kwargs) auth = request.headers.get("Authorization", "") - if not auth.startswith("Bearer "): + if auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") token = auth.split(" ", 1)[1].strip() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1326"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1326_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1326_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1326_1"><button class="btn btn-outline-success"><span class="job_id">1326 : Job ID 42ac011678d94c728dd85c70f62eb65b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1326_1" data-parent="#job_list___sub_accordion_1326" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1326_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (190, 11), end pos: (190, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -187,7 +187,7 @@ """Validate user input before database operations""" if len(email) &gt; 320 or len(login) &gt; 64: return False, "Email or login too long" - if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): + if re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid email format ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135551837652Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135552755039Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid email format ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1327"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1327_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1327_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1327_1"><button class="btn btn-outline-success"><span class="job_id">1327 : Job ID a314dc3d298349c6a3fb3266e4ff2f73</span></button></div></a><div aria-labelledby="job_list___sub_heading_1327_1" data-parent="#job_list___sub_accordion_1327" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1327_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=192" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (192, 11), end pos: (192, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -189,7 +189,7 @@ return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" - if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): + if re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format" return True, "" </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid login format ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195926857670Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195927749545Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid login format ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1328"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1328_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1328_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1328_1"><button class="btn btn-outline-success"><span class="job_id">1328 : Job ID 3a0960362e5c475eb6e61a25a39e90d9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1328_1" data-parent="#job_list___sub_accordion_1328" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1328_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 11), end pos: (204, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if email or not login or not password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115936825732Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115937717628Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1329"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1329_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1329_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1329_1"><button class="btn btn-outline-success"><span class="job_id">1329 : Job ID 19d8c56c17904d5eb230e7e7a8e7b3ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1329_1" data-parent="#job_list___sub_accordion_1329" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1329_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 24), end pos: (204, 27)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if not email or login or not password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214450101538Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214450949953Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1330"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1330_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1330_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1330_1"><button class="btn btn-outline-success"><span class="job_id">1330 : Job ID fdc3a546062343578716de22332ca006</span></button></div></a><div aria-labelledby="job_list___sub_heading_1330_1" data-parent="#job_list___sub_accordion_1330" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1330_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 37), end pos: (204, 40)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if not email or not login or password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185933302008Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185934168163Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 19.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1331"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1331_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1331_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1331_1"><button class="btn btn-outline-success"><span class="job_id">1331 : Job ID 7f9366c38037426b84d98cc1aa3f532c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1331_1" data-parent="#job_list___sub_accordion_1331" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1331_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=212" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (212, 15), end pos: (212, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -209,7 +209,7 @@ try: is_valid, error_msg = validate_user_input(email, login) - if not is_valid: + if is_valid: app.logger.warning("User input validation failed: %s", error_msg) return jsonify({"error": error_msg}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 13 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122622102562Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122623002266Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1332"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1332_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1332_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1332_1"><button class="btn btn-outline-success"><span class="job_id">1332 : Job ID 86b44a6309be4c7db89b3cea2cf65551</span></button></div></a><div aria-labelledby="job_list___sub_heading_1332_1" data-parent="#job_list___sub_accordion_1332" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1332_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=248" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (248, 11), end pos: (248, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -245,7 +245,7 @@ email = (payload.get("email") or "").strip() password = payload.get("password") or "" - if not email or not password: + if email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1333"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1333_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1333_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1333_1"><button class="btn btn-outline-success"><span class="job_id">1333 : Job ID 3d0c618988bc4d17ae973deecdafb859</span></button></div></a><div aria-labelledby="job_list___sub_heading_1333_1" data-parent="#job_list___sub_accordion_1333" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1333_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=248" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (248, 24), end pos: (248, 27)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -245,7 +245,7 @@ email = (payload.get("email") or "").strip() password = payload.get("password") or "" - if not email or not password: + if not email or password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1334"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1334_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1334_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1334_1"><button class="btn btn-outline-success"><span class="job_id">1334 : Job ID fa922c1542f8484989f7a0b55acd25aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1334_1" data-parent="#job_list___sub_accordion_1334" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1334_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=271" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (271, 19), end pos: (271, 22)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -268,7 +268,7 @@ is_valid = False row = None - if not is_valid: + if is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;",</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1335"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1335_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1335_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1335_1"><button class="btn btn-outline-success"><span class="job_id">1335 : Job ID 19f49c52be7045c6b04cd398584b254e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1335_1" data-parent="#job_list___sub_accordion_1335" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1335_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 11), end pos: (307, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1336"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1336_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1336_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1336_1"><button class="btn btn-outline-success"><span class="job_id">1336 : Job ID 5c538602df5948ce8088254689f970b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1336_1" data-parent="#job_list___sub_accordion_1336" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1336_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=326" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (326, 11), end pos: (326, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -323,7 +323,7 @@ "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 - if not file.filename.lower().endswith(".pdf"): + if file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:328 Upload attempt with invalid file extension: input.pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:328 Upload attempt with invalid file extension: watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1337"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1337_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1337_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1337_1"><button class="btn btn-outline-success"><span class="job_id">1337 : Job ID 61767bd1316745488f95540c0aa55190</span></button></div></a><div aria-labelledby="job_list___sub_heading_1337_1" data-parent="#job_list___sub_accordion_1337" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1337_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=335" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (335, 11), end pos: (335, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -332,7 +332,7 @@ # Sanitize filename fname = secure_filename(file.filename) - if not fname: + if fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename )</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 29 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:336 Upload attempt with invalid filename: input.pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 29 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:336 Upload attempt with invalid filename: watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1338"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1338_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1338_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1338_1"><button class="btn btn-outline-success"><span class="job_id">1338 : Job ID a7dd14c210cb404fbfd61bc9d9de0ddb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1338_1" data-parent="#job_list___sub_accordion_1338" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1338_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=351" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (351, 15), end pos: (351, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -348,7 +348,7 @@ try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() - if not str(stored_path).startswith(str(user_dir.resolve())): + if str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 25 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:352 Upload attempt with invalid path: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230039815390Z__input.pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 25 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:352 Upload attempt with invalid path: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230040830065Z__watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1339"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1339_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1339_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1339_1"><button class="btn btn-outline-success"><span class="job_id">1339 : Job ID 98d19f17ce38498395934731a43eaea5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1339_1" data-parent="#job_list___sub_accordion_1339" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1339_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=485" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (485, 19), end pos: (485, 22)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -482,7 +482,7 @@ {"did": document_id, "uid": int(g.user["id"])}, ).first() - if not doc: + if doc: app.logger.warning( "Document not found or access denied for id=%s", document_id )</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1340"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1340_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1340_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1340_1"><button class="btn btn-outline-success"><span class="job_id">1340 : Job ID 953876a7d52b4eafae9a933ab21dcb90</span></button></div></a><div aria-labelledby="job_list___sub_heading_1340_1" data-parent="#job_list___sub_accordion_1340" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1340_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=529" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (529, 15), end pos: (529, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -526,7 +526,7 @@ def list_all_versions(): try: # Validate user data from auth token - if not g.user or not g.user.get("id"): + if g.user or not g.user.get("id"): app.logger.error("Missing user info in auth token") return jsonify({"error": "Invalid authentication"}), 401 </pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 35 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:530 Missing user info in auth token ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1341"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1341_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1341_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1341_1"><button class="btn btn-outline-success"><span class="job_id">1341 : Job ID 8388b8a527084014be6ac5ff09766a82</span></button></div></a><div aria-labelledby="job_list___sub_heading_1341_1" data-parent="#job_list___sub_accordion_1341" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1341_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=529" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (529, 29), end pos: (529, 32)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -526,7 +526,7 @@ def list_all_versions(): try: # Validate user data from auth token - if not g.user or not g.user.get("id"): + if not g.user or g.user.get("id"): app.logger.error("Missing user info in auth token") return jsonify({"error": "Invalid authentication"}), 401 </pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 35 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:530 Missing user info in auth token ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1342"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1342_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1342_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_1342_1"><button class="btn btn-outline-info"><span class="job_id">1342 : Job ID 26ad16dff22d4900b0184e3a4d6f6f1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1342_1" data-parent="#job_list___sub_accordion_1342" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1342_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=609" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (609, 11), end pos: (609, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 5836: invalid start byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1343"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1343_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1343_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1343_1"><button class="btn btn-outline-success"><span class="job_id">1343 : Job ID 4858aad8a1b146798149d19c5a8062f3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1343_1" data-parent="#job_list___sub_accordion_1343" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1343_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=629" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (629, 11), end pos: (629, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -626,7 +626,7 @@ ) return jsonify({"error": "document path invalid"}), 500 - if not resolved.exists(): + if resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:630 File missing on disk for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1344"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1344_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1344_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1344_1"><button class="btn btn-outline-danger"><span class="job_id">1344 : Job ID 946868ab546545489521f86c033adf26</span></button></div></a><div aria-labelledby="job_list___sub_heading_1344_1" data-parent="#job_list___sub_accordion_1344" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1344_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=654" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (654, 15), end pos: (654, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -651,7 +651,7 @@ # Prepare safe filename (preserve existing .pdf if present) name = (row.name or "document").strip().replace("\r", "").replace("\n", "") - if not name.lower().endswith(".pdf"): + if name.lower().endswith(".pdf"): name = f"{name}.pdf" # Stat via the same FD to avoid TOCTOU</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1345"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1345_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1345_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1345_1"><button class="btn btn-outline-success"><span class="job_id">1345 : Job ID 1a8b41ca1b064895ae8b677e1cb05ecf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1345_1" data-parent="#job_list___sub_accordion_1345" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1345_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=696" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (696, 11), end pos: (696, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -693,7 +693,7 @@ @app.get("/api/get-version/&lt;link&gt;") def get_version(link: str): # Accept both 32-char (RMAP session secrets) and 64-char (SHA-256 style) tokens - if not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): + if re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): app.logger.warning("Invalid version link format: %s", link) return jsonify({"error": "document not found"}), 404 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614eb8640f9f997a3667'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:697 Invalid version link format: 0000000000bc614eb8640f9f997a3667 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1346"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1346_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1346_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1346_1"><button class="btn btn-outline-success"><span class="job_id">1346 : Job ID 1569ed365a02487c96de3be866af3dfb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1346_1" data-parent="#job_list___sub_accordion_1346" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1346_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=718" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (718, 11), end pos: (718, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -715,7 +715,7 @@ inc_db_error("get_version") return jsonify({"error": "database error"}), 503 - if not row: + if row: app.logger.warning("Version not found for link: %s", link) return jsonify({"error": "document not found"}), 404 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e117bec5e7520f9ec'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:719 Version not found for link: 0000000000bc614e117bec5e7520f9ec ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1347"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1347_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1347_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1347_1"><button class="btn btn-outline-success"><span class="job_id">1347 : Job ID 362a5ec9dc4f412d8dc027c3f7db4ddb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1347_1" data-parent="#job_list___sub_accordion_1347" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1347_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=730" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (730, 11), end pos: (730, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -727,7 +727,7 @@ ) return jsonify({"error": "document path invalid"}), 500 - if not resolved.exists(): + if resolved.exists(): app.logger.error("File missing on disk for version link=%s", link) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e366b56a5999d1c6e'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:731 File missing on disk for version link=0000000000bc614e366b56a5999d1c6e ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1348"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1348_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1348_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1348_1"><button class="btn btn-outline-danger"><span class="job_id">1348 : Job ID 92a6477a2d22440fa7f2710796ef915e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1348_1" data-parent="#job_list___sub_accordion_1348" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1348_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=784" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (784, 11), end pos: (784, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -781,7 +781,7 @@ def _safe_resolve_under_storage(p: str, storage_root: Path) -&gt; Path: storage_root = storage_root.resolve() fp = Path(p) - if not fp.is_absolute(): + if fp.is_absolute(): fp = storage_root / fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1349"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1349_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1349_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1349_1"><button class="btn btn-outline-success"><span class="job_id">1349 : Job ID 42efa55c598b47ecb55eb7516ee50d29</span></button></div></a><div aria-labelledby="job_list___sub_heading_1349_1" data-parent="#job_list___sub_accordion_1349" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1349_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=789" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (789, 15), end pos: (789, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -786,7 +786,7 @@ fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"): - if not fp.is_relative_to(storage_root): + if fp.is_relative_to(storage_root): raise RuntimeError(f"path {fp} escapes storage root {storage_root}") else: try:</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ea152e0dfd1df8db7'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:725 Rejected version path for link 0000000000bc614ea152e0dfd1df8db7: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\rmap_watermarks\rmap_0000000000bc614ea152e0dfd1df8db7.pdf (path C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\rmap_watermarks\rmap_0000000000bc614ea152e0dfd1df8db7.pdf escapes storage root C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1350"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1350_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1350_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1350_1"><button class="btn btn-outline-success"><span class="job_id">1350 : Job ID 289e4d35ee044949ae0da811ed8bef6a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1350_1" data-parent="#job_list___sub_accordion_1350" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1350_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=848" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (848, 11), end pos: (848, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -845,7 +845,7 @@ inc_db_error("delete_document_select") return jsonify({"error": "database error during delete"}), 503 - if not row: + if row: # DonÔÇÖt reveal othersÔÇÖ docsÔÇöjust say not found app.logger.warning( "Document not found or access denied for deletion id=%s", doc_id</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1351"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1351_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1351_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1351_1"><button class="btn btn-outline-success"><span class="job_id">1351 : Job ID 553c2ef69e38435dbf59dc6823c27908</span></button></div></a><div aria-labelledby="job_list___sub_heading_1351_1" data-parent="#job_list___sub_accordion_1351" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1351_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=911" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (911, 11), end pos: (911, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -908,7 +908,7 @@ @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET - if not document_id: + if document_id: document_id = ( request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1352"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1352_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1352_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1352_1"><button class="btn btn-outline-success"><span class="job_id">1352 : Job ID 903ae17183144c56830839f84fa03e50</span></button></div></a><div aria-labelledby="job_list___sub_heading_1352_1" data-parent="#job_list___sub_accordion_1352" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1352_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=943" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (943, 12), end pos: (943, 15)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -940,7 +940,7 @@ app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( - not method + method or not intended_for or not isinstance(secret, str) or not isinstance(key, str)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1353"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1353_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1353_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1353_1"><button class="btn btn-outline-success"><span class="job_id">1353 : Job ID 6d88aa19dadb4c9d8e088112aa499c39</span></button></div></a><div aria-labelledby="job_list___sub_heading_1353_1" data-parent="#job_list___sub_accordion_1353" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1353_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=944" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (944, 15), end pos: (944, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -941,7 +941,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 if ( not method - or not intended_for + or intended_for or not isinstance(secret, str) or not isinstance(key, str) ):</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1354"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1354_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1354_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1354_1"><button class="btn btn-outline-success"><span class="job_id">1354 : Job ID 8a23602cf56f476eb894af6860b2fd04</span></button></div></a><div aria-labelledby="job_list___sub_heading_1354_1" data-parent="#job_list___sub_accordion_1354" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1354_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=945" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (945, 15), end pos: (945, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -942,7 +942,7 @@ if ( not method or not intended_for - or not isinstance(secret, str) + or isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1355"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1355_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1355_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1355_1"><button class="btn btn-outline-success"><span class="job_id">1355 : Job ID 23283997d06e43fbb5d90011c7d3046b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1355_1" data-parent="#job_list___sub_accordion_1355" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1355_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=946" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (946, 15), end pos: (946, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -943,7 +943,7 @@ not method or not intended_for or not isinstance(secret, str) - or not isinstance(key, str) + or isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1356"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1356_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1356_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1356_1"><button class="btn btn-outline-success"><span class="job_id">1356 : Job ID dea3642b0f114b5dabcd0b03ef138c8a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1356_1" data-parent="#job_list___sub_accordion_1356" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1356_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=971" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (971, 11), end pos: (971, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -968,7 +968,7 @@ app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 - if not row: + if row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id )</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 1 failed, 41 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1357"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1357_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1357_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1357_1"><button class="btn btn-outline-danger"><span class="job_id">1357 : Job ID e6673a8ee1a14e8d9ce9e1442c9319bf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1357_1" data-parent="#job_list___sub_accordion_1357" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1357_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=980" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (980, 11), end pos: (980, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -977,7 +977,7 @@ # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) - if not file_path.is_absolute(): + if file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1358"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1358_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1358_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1358_1"><button class="btn btn-outline-success"><span class="job_id">1358 : Job ID 6dd2e35f1bca4b42aa4d8a7b7ec53459</span></button></div></a><div aria-labelledby="job_list___sub_heading_1358_1" data-parent="#job_list___sub_accordion_1358" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1358_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=988" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (988, 11), end pos: (988, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -985,7 +985,7 @@ except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 - if not file_path.exists(): + if file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 410 == 201 E + where 410 = &lt;WrapperTestResponse 33 bytes [410 GONE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:989 File missing on disk for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 410 == 201 1 failed, 41 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1359"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1359_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1359_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1359_1"><button class="btn btn-outline-success"><span class="job_id">1359 : Job ID bb86d3e3b76f4c01825ccc1b2a280b4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1359_1" data-parent="#job_list___sub_accordion_1359" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1359_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 15), end pos: (1024, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 44 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1026 Watermarking produced no output for document 1 using method robust-xmp ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1360"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1360_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1360_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1360_1"><button class="btn btn-outline-success"><span class="job_id">1360 : Job ID ebbb65a4de0940d5a5afb177980ad8f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1360_1" data-parent="#job_list___sub_accordion_1360" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1360_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1148" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1148, 11), end pos: (1148, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1145,7 +1145,7 @@ @require_auth def read_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST - if not document_id: + if document_id: document_id = ( request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1361"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1361_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1361_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1361_1"><button class="btn btn-outline-success"><span class="job_id">1361 : Job ID 8fd5c2fa9cc3499b99898431a7bfe741</span></button></div></a><div aria-labelledby="job_list___sub_heading_1361_1" data-parent="#job_list___sub_accordion_1361" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1361_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 11), end pos: (1177, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 41 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1178 Missing required fields for watermarking: {'id': 2, 'key': 'strong-password', 'method': 'overlay-watermark', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1362"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1362_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1362_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1362_1"><button class="btn btn-outline-success"><span class="job_id">1362 : Job ID 81f1437abdf84121811a5827b11e230f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1362_1" data-parent="#job_list___sub_accordion_1362" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1362_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 25), end pos: (1177, 28)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if not method or isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T163146226073Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T163147099287Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1363"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1363_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1363_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1363_1"><button class="btn btn-outline-success"><span class="job_id">1363 : Job ID ed0d6556c6b44585a2a93311da76437e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1363_1" data-parent="#job_list___sub_accordion_1363" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1363_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 56), end pos: (1177, 59)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if not method or not isinstance(method, str) or isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 41 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1178 Missing required fields for watermarking: {'id': 2, 'key': 'strong-password', 'method': 'overlay-watermark', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1364"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1364_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1364_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1364_1"><button class="btn btn-outline-success"><span class="job_id">1364 : Job ID 592c1ea532e94b9689f8e4b9bcc5d6ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_1364_1" data-parent="#job_list___sub_accordion_1364" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1364_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1201" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1201, 11), end pos: (1201, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1198,7 +1198,7 @@ ) return jsonify({"error": "database error"}), 503 - if not row: + if row: app.logger.warning( "Document not found or access denied for watermark read id=%s", doc_id )</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 404 == 201 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1365"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1365_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1365_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1365_1"><button class="btn btn-outline-danger"><span class="job_id">1365 : Job ID b7d72d9ad6294a63a478e8562922b3b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1365_1" data-parent="#job_list___sub_accordion_1365" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1365_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1210" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1210, 11), end pos: (1210, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1207,7 +1207,7 @@ # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) - if not file_path.is_absolute(): + if file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1366"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1366_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1366_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1366_1"><button class="btn btn-outline-success"><span class="job_id">1366 : Job ID 2152c3577fb84f77b7c87929292b8b39</span></button></div></a><div aria-labelledby="job_list___sub_heading_1366_1" data-parent="#job_list___sub_accordion_1366" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1366_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1218" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1218, 11), end pos: (1218, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1215,7 +1215,7 @@ except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 - if not file_path.exists(): + if file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 410 == 201 E + where 410 = &lt;WrapperTestResponse 33 bytes [410 GONE]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1219 File missing on disk for document id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 410 == 201 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1367"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1367_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1367_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1367_1"><button class="btn btn-outline-success"><span class="job_id">1367 : Job ID cf31d7cdf4b54462bca2e673647c9dab</span></button></div></a><div aria-labelledby="job_list___sub_heading_1367_1" data-parent="#job_list___sub_accordion_1367" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1367_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1249" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1249, 11), end pos: (1249, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1246,7 +1246,7 @@ @app.get("/metrics") def metrics(): - if not _is_authorized_metrics_request(): + if _is_authorized_metrics_request(): # Obscure existence a bit ÔÇô return 404 instead of 403 to casual scans app.logger.warning( "Unauthorized metrics access attempt from %s", request.remote_addr</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T205417904435Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T205418783672Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1368"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1368_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1368_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1368_1"><button class="btn btn-outline-success"><span class="job_id">1368 : Job ID ef8daa4379404cf7be5ae301373bf659</span></button></div></a><div aria-labelledby="job_list___sub_heading_1368_1" data-parent="#job_list___sub_accordion_1368" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1368_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=37" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (37, 3), end pos: (37, 48)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -34,7 +34,7 @@ MAX_DB_INT = (2**63) - 1 RMAPHandler = None # default -if not os.environ.get("TATOU_TEST_DISABLE_RMAP"): +if not not os.environ.get("TATOU_TEST_DISABLE_RMAP"): try: # Allow tests to disable RMAP dependency via env var from rmap_handler import RMAPHandler as _RMAPHandler # type: ignore </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1369"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1369_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1369_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1369_1"><button class="btn btn-outline-success"><span class="job_id">1369 : Job ID 163cf7ea387c46579ede5ef0a533c0ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_1369_1" data-parent="#job_list___sub_accordion_1369" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1369_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=74" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (74, 11), end pos: (74, 22)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -71,7 +71,7 @@ def get_engine(): eng = app.config.get("_ENGINE") - if eng is None: + if not eng is None: try: eng = create_engine(db_url(), pool_pre_ping=True, future=True) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: 'NoneType' object has no attribute 'begin' ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: 'NoneType' object has no attribute 'connect' _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T210012324205Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document 'NoneType' object has no attribute 'connect' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T210013064593Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: 'NoneType' object has no attribute 'connect' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: 'NoneType' object has no attribute 'begin' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 19.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1370"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1370_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1370_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1370_1"><button class="btn btn-outline-success"><span class="job_id">1370 : Job ID 6d9d371dd6f14c7bb2742dc559c09807</span></button></div></a><div aria-labelledby="job_list___sub_heading_1370_1" data-parent="#job_list___sub_accordion_1370" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1370_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (84, 7), end pos: (84, 30)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -81,7 +81,7 @@ return eng # --- RMAP initialization (skippable in tests) --- - if RMAPHandler is not None: + if not RMAPHandler is not None: try: RMAPHandler(app, str(app.config["STORAGE_DIR"]), get_engine) except Exception as e: # pragma: no cover - defensive; don't fail app</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1371"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1371_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1371_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1371_1"><button class="btn btn-outline-success"><span class="job_id">1371 : Job ID 954e297edcff45d186d7cabebd907f4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1371_1" data-parent="#job_list___sub_accordion_1371" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1371_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=101" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (101, 15), end pos: (101, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -98,7 +98,7 @@ def require_auth(f): @wraps(f) def wrapper(*args, **kwargs): - if app.config['TESTING']: + if not app.config['TESTING']: g.user = {"id": 1, "login": "username", "email": "user@email.se"} return f(*args, **kwargs) auth = request.headers.get("Authorization", "")</pre></div><div class="alert alert-secondary"><pre class="diff">...FFFFF.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 401 == 201 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 401 == 201 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 401 == 201 E + where 401 = &lt;WrapperTestResponse 52 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:95 Auth error (401): Missing or invalid Authorization header ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 401 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 401 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 401 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 401 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 401 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 401 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 401 == 200 8 failed, 34 passed, 23 warnings in 20.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1372"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1372_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1372_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1372_1"><button class="btn btn-outline-danger"><span class="job_id">1372 : Job ID 4dd27ce0e3b04041bbe49ce2881077b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1372_1" data-parent="#job_list___sub_accordion_1372" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1372_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (105, 15), end pos: (105, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -102,7 +102,7 @@ g.user = {"id": 1, "login": "username", "email": "user@email.se"} return f(*args, **kwargs) auth = request.headers.get("Authorization", "") - if not auth.startswith("Bearer "): + if not not auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") token = auth.split(" ", 1)[1].strip() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1373"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1373_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1373_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1373_1"><button class="btn btn-outline-danger"><span class="job_id">1373 : Job ID 396fbfa18dc74b7f8a0241002db2f569</span></button></div></a><div aria-labelledby="job_list___sub_heading_1373_1" data-parent="#job_list___sub_accordion_1373" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1373_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=139" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (139, 45), end pos: (139, 61)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -136,7 +136,7 @@ def _tatou_before(): try: # record start for latency request._tatou_start = time.time() # type: ignore[attr-defined] - route = request.url_rule.rule if request.url_rule else request.path + route = request.url_rule.rule if not request.url_rule else request.path inc_inflight(route) # capture request size if content-length header present try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1374"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1374_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1374_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1374_1"><button class="btn btn-outline-danger"><span class="job_id">1374 : Job ID 2263ba1c6aab4453a0ee38efa014b081</span></button></div></a><div aria-labelledby="job_list___sub_heading_1374_1" data-parent="#job_list___sub_accordion_1374" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1374_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=144" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (144, 19), end pos: (144, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -141,7 +141,7 @@ # capture request size if content-length header present try: cl = request.content_length - if cl is not None: + if not cl is not None: observe_request_size(request.method, route, cl) except Exception as exc: # pragma: no cover - soft fail app.logger.warning("Request size capture failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1375"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1375_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1375_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1375_1"><button class="btn btn-outline-danger"><span class="job_id">1375 : Job ID 11d07ead72d245e5a08aa2d596ac3951</span></button></div></a><div aria-labelledby="job_list___sub_heading_1375_1" data-parent="#job_list___sub_accordion_1375" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1375_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=155" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (155, 15), end pos: (155, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -152,7 +152,7 @@ def _tatou_after(resp): try: start = getattr(request, "_tatou_start", None) - if start is not None: + if not start is not None: dur = time.time() - start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1376"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1376_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1376_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1376_1"><button class="btn btn-outline-danger"><span class="job_id">1376 : Job ID 60c1a5a94eca452e9d36213f7088f5f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1376_1" data-parent="#job_list___sub_accordion_1376" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1376_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=157" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (157, 49), end pos: (157, 65)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -154,7 +154,7 @@ start = getattr(request, "_tatou_start", None) if start is not None: dur = time.time() - start - route = request.url_rule.rule if request.url_rule else request.path + route = request.url_rule.rule if not request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) except Exception as exc: # pragma: no cover - defensive app.logger.warning("after_request instrumentation failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1377"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1377_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1377_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1377_1"><button class="btn btn-outline-success"><span class="job_id">1377 : Job ID 0123453a784b4c11ba5006fd6b8a7ebf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1377_1" data-parent="#job_list___sub_accordion_1377" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1377_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 11), end pos: (188, 46)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if not len(email) &gt; 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 36 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211239961138Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211240774552Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Email or login too long ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1378"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1378_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1378_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1378_1"><button class="btn btn-outline-success"><span class="job_id">1378 : Job ID 2a4b724eda8c478291f44f7a8271772b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1378_1" data-parent="#job_list___sub_accordion_1378" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1378_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (190, 11), end pos: (190, 83)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -187,7 +187,7 @@ """Validate user input before database operations""" if len(email) &gt; 320 or len(login) &gt; 64: return False, "Email or login too long" - if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): + if not not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid email format ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165512594775Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165513529220Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid email format ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1379"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1379_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1379_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1379_1"><button class="btn btn-outline-success"><span class="job_id">1379 : Job ID 86392777f44d4bebb11226ceecf15ae7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1379_1" data-parent="#job_list___sub_accordion_1379" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1379_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=192" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (192, 11), end pos: (192, 56)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -189,7 +189,7 @@ return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" - if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): + if not not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format" return True, "" </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid login format ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125656930030Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125657761620Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: Invalid login format ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1380"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1380_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1380_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1380_1"><button class="btn btn-outline-success"><span class="job_id">1380 : Job ID 7dc826c464d64e3cae3004bbeaea039a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1380_1" data-parent="#job_list___sub_accordion_1380" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1380_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 11), end pos: (204, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if not not email or not login or not password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194808795106Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194809618728Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 19.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1381"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1381_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1381_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1381_1"><button class="btn btn-outline-success"><span class="job_id">1381 : Job ID 48f226565f134beaba91e371dd4f48fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1381_1" data-parent="#job_list___sub_accordion_1381" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1381_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=212" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (212, 15), end pos: (212, 27)</button></a></pre><pre>operator: core/AddNot, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -209,7 +209,7 @@ try: is_valid, error_msg = validate_user_input(email, login) - if not is_valid: + if not not is_valid: app.logger.warning("User input validation failed: %s", error_msg) return jsonify({"error": error_msg}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 13 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131614667374Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T131615504294Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1382"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1382_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1382_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1382_1"><button class="btn btn-outline-success"><span class="job_id">1382 : Job ID 54f3d557927040fe8baa186f2fcd7a50</span></button></div></a><div aria-labelledby="job_list___sub_heading_1382_1" data-parent="#job_list___sub_accordion_1382" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1382_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=248" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (248, 11), end pos: (248, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -245,7 +245,7 @@ email = (payload.get("email") or "").strip() password = payload.get("password") or "" - if not email or not password: + if not not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1383"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1383_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1383_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1383_1"><button class="btn btn-outline-success"><span class="job_id">1383 : Job ID dc3e170d23644e91adfab4f5f12368b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1383_1" data-parent="#job_list___sub_accordion_1383" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1383_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (264, 19), end pos: (264, 22)</button></a></pre><pre>operator: core/AddNot, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -261,7 +261,7 @@ ).first() # Constant-time comparison to prevent timing attacks - if row: + if not row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1384"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1384_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1384_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1384_1"><button class="btn btn-outline-success"><span class="job_id">1384 : Job ID 012b0f173bac46858ecf4cb5e6082cad</span></button></div></a><div aria-labelledby="job_list___sub_heading_1384_1" data-parent="#job_list___sub_accordion_1384" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1384_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=271" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (271, 19), end pos: (271, 31)</button></a></pre><pre>operator: core/AddNot, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -268,7 +268,7 @@ is_valid = False row = None - if not is_valid: + if not not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;",</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1385"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1385_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1385_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1385_1"><button class="btn btn-outline-danger"><span class="job_id">1385 : Job ID 69201a8f1f4545c6b53ff8b1e8f28d6a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1385_1" data-parent="#job_list___sub_accordion_1385" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1385_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=274" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (274, 33), end pos: (274, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -271,7 +271,7 @@ if not is_valid: app.logger.warning( "Failed login attempt for email: %s", - email if email else "&lt;empty&gt;", + email if not email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1386"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1386_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1386_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1386_1"><button class="btn btn-outline-success"><span class="job_id">1386 : Job ID b4e044a55bd8450fb13183d2391f1f30</span></button></div></a><div aria-labelledby="job_list___sub_heading_1386_1" data-parent="#job_list___sub_accordion_1386" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1386_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=301" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (301, 11), end pos: (301, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -298,7 +298,7 @@ @app.post("/api/upload-document") @require_auth def upload_document(): - if "file" not in request.files: + if not "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") return jsonify({"error": "file is required (multipart/form-data)"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 51 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 51 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1387"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1387_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1387_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1387_1"><button class="btn btn-outline-success"><span class="job_id">1387 : Job ID f5d192bf60cc430f8675cc9f5358f557</span></button></div></a><div aria-labelledby="job_list___sub_heading_1387_1" data-parent="#job_list___sub_accordion_1387" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1387_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 11), end pos: (307, 42)</button></a></pre><pre>operator: core/AddNot, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 27 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:308 Upload attempt with empty filename _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1388"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1388_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1388_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1388_1"><button class="btn btn-outline-success"><span class="job_id">1388 : Job ID cfa0535c4ca945e38d70a1a3368f6218</span></button></div></a><div aria-labelledby="job_list___sub_heading_1388_1" data-parent="#job_list___sub_accordion_1388" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1388_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 11), end pos: (314, 70)</button></a></pre><pre>operator: core/AddNot, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if not file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x0000023F10FED540&gt;('id') E + where &lt;built-in method get of dict object at 0x0000023F10FED540&gt; = {'creation': '2025-10-17T14:51:38.465836', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1389"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1389_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1389_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1389_1"><button class="btn btn-outline-success"><span class="job_id">1389 : Job ID b8790c3434084dbf9f2842facb314841</span></button></div></a><div aria-labelledby="job_list___sub_heading_1389_1" data-parent="#job_list___sub_accordion_1389" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1389_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=320" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (320, 11), end pos: (320, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -317,7 +317,7 @@ return jsonify({"error": "file too large"}), 413 # Validate file type and MIME type - if file.mimetype != "application/pdf": + if not file.mimetype != "application/pdf": inc_suspicious("upload_bad_mime") app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:322 Upload attempt with invalid MIME type: application/pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1390"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1390_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1390_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1390_1"><button class="btn btn-outline-success"><span class="job_id">1390 : Job ID bea01f756f01472db6de9abbbbcdea85</span></button></div></a><div aria-labelledby="job_list___sub_heading_1390_1" data-parent="#job_list___sub_accordion_1390" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1390_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=326" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (326, 11), end pos: (326, 53)</button></a></pre><pre>operator: core/AddNot, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -323,7 +323,7 @@ "Upload attempt with invalid MIME type: %s", file.mimetype ) return jsonify({"error": "only PDF files are allowed"}), 415 - if not file.filename.lower().endswith(".pdf"): + if not not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:328 Upload attempt with invalid file extension: input.pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 415 == 201 E + where 415 = &lt;WrapperTestResponse 39 bytes [415 UNSUPPORTED MEDIA TYPE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:328 Upload attempt with invalid file extension: watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 415 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 415 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1391"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1391_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1391_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1391_1"><button class="btn btn-outline-success"><span class="job_id">1391 : Job ID e034fde8f79947bd94b92d1103250242</span></button></div></a><div aria-labelledby="job_list___sub_heading_1391_1" data-parent="#job_list___sub_accordion_1391" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1391_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=335" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (335, 11), end pos: (335, 20)</button></a></pre><pre>operator: core/AddNot, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -332,7 +332,7 @@ # Sanitize filename fname = secure_filename(file.filename) - if not fname: + if not not fname: app.logger.warning( "Upload attempt with invalid filename: %s", file.filename )</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 29 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:336 Upload attempt with invalid filename: input.pdf __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 29 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:336 Upload attempt with invalid filename: watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1392"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1392_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1392_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1392_1"><button class="btn btn-outline-success"><span class="job_id">1392 : Job ID c97f5ebdb9f0475fa303a044cbb176c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1392_1" data-parent="#job_list___sub_accordion_1392" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1392_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=351" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (351, 15), end pos: (351, 71)</button></a></pre><pre>operator: core/AddNot, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -348,7 +348,7 @@ try: # Check for path traversal attempts stored_path = (user_dir / stored_name).resolve() - if not str(stored_path).startswith(str(user_dir.resolve())): + if not not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) return jsonify({"error": "invalid path"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 25 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:352 Upload attempt with invalid path: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110505652467Z__input.pdf __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 25 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:352 Upload attempt with invalid path: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110506474155Z__watermarked.pdf _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 400 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1393"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1393_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1393_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1393_1"><button class="btn btn-outline-danger"><span class="job_id">1393 : Job ID fac21dd3e3e6448cb2dba83f970fea5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1393_1" data-parent="#job_list___sub_accordion_1393" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1393_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=406" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (406, 15), end pos: (406, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -403,7 +403,7 @@ "id": int(row.id), "name": row.name, "creation": row.creation.isoformat() - if hasattr(row.creation, "isoformat") + if not hasattr(row.creation, "isoformat") else str(row.creation), "sha256": row.sha256_hex, "size": int(row.size),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1394"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1394_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1394_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1394_1"><button class="btn btn-outline-danger"><span class="job_id">1394 : Job ID 213d5374e7934f3aae447f7cabb9daa3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1394_1" data-parent="#job_list___sub_accordion_1394" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1394_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=443" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (443, 19), end pos: (443, 51)</button></a></pre><pre>operator: core/AddNot, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -440,7 +440,7 @@ "id": int(r.id), "name": r.name, "creation": r.creation.isoformat() - if hasattr(r.creation, "isoformat") + if not hasattr(r.creation, "isoformat") else str(r.creation), "sha256": r.sha256_hex, "size": int(r.size),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1395"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1395_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1395_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1395_1"><button class="btn btn-outline-success"><span class="job_id">1395 : Job ID 5f5d752be4774cebbeb5dfb32dc398f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1395_1" data-parent="#job_list___sub_accordion_1395" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1395_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=458" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (458, 11), end pos: (458, 30)</button></a></pre><pre>operator: core/AddNot, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -455,7 +455,7 @@ @require_auth def list_versions(document_id: int | None = None): # Input validation - if document_id is None: + if not document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195615912518Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195616745321Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1396"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1396_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1396_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1396_1"><button class="btn btn-outline-success"><span class="job_id">1396 : Job ID 0820e4af591f416eaf5ee277b9d41e29</span></button></div></a><div aria-labelledby="job_list___sub_heading_1396_1" data-parent="#job_list___sub_accordion_1396" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1396_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=461" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (461, 50), end pos: (461, 61)</button></a></pre><pre>operator: core/AddNot, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -458,7 +458,7 @@ if document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: - document_id = int(document_id) if document_id else None + document_id = int(document_id) if not document_id else None if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1397"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1397_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1397_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1397_1"><button class="btn btn-outline-success"><span class="job_id">1397 : Job ID 0dd5a3c0488848ea91868ed1e6f6e1e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1397_1" data-parent="#job_list___sub_accordion_1397" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1397_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 19), end pos: (462, 86)</button></a></pre><pre>operator: core/AddNot, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if not document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1398"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1398_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1398_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1398_1"><button class="btn btn-outline-success"><span class="job_id">1398 : Job ID 8a16bb8ac5f9481baf677945adc52cb7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1398_1" data-parent="#job_list___sub_accordion_1398" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1398_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 11), end pos: (469, 78)</button></a></pre><pre>operator: core/AddNot, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if not document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1399"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1399_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1399_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1399_1"><button class="btn btn-outline-success"><span class="job_id">1399 : Job ID 3ac998047c0b4a81b74e22cb774ddf0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1399_1" data-parent="#job_list___sub_accordion_1399" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1399_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=485" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (485, 19), end pos: (485, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -482,7 +482,7 @@ {"did": document_id, "uid": int(g.user["id"])}, ).first() - if not doc: + if not not doc: app.logger.warning( "Document not found or access denied for id=%s", document_id )</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1400"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1400_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1400_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1400_1"><button class="btn btn-outline-success"><span class="job_id">1400 : Job ID 3cb25651596c412d8053bf766cc1bde9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1400_1" data-parent="#job_list___sub_accordion_1400" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1400_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=529" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (529, 15), end pos: (529, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -526,7 +526,7 @@ def list_all_versions(): try: # Validate user data from auth token - if not g.user or not g.user.get("id"): + if not not g.user or not g.user.get("id"): app.logger.error("Missing user info in auth token") return jsonify({"error": "Invalid authentication"}), 401 </pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 35 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:530 Missing user info in auth token ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - assert 401 == 200 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1401"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1401_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1401_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1401_1"><button class="btn btn-outline-success"><span class="job_id">1401 : Job ID bb102bee9d66428fabd477bf5d9ed335</span></button></div></a><div aria-labelledby="job_list___sub_heading_1401_1" data-parent="#job_list___sub_accordion_1401" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1401_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=575" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (575, 11), end pos: (575, 30)</button></a></pre><pre>operator: core/AddNot, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -572,7 +572,7 @@ @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= - if document_id is None: + if not document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 400 == 404 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:460: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 404 2 failed, 40 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1402"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1402_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1402_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1402_1"><button class="btn btn-outline-success"><span class="job_id">1402 : Job ID 5053d5559e594edf81125bf5d9cd6d32</span></button></div></a><div aria-labelledby="job_list___sub_heading_1402_1" data-parent="#job_list___sub_accordion_1402" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1402_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 11), end pos: (583, 78)</button></a></pre><pre>operator: core/AddNot, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if not document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000421930095Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000423454201Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 24.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1403"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1403_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1403_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_1403_1"><button class="btn btn-outline-info"><span class="job_id">1403 : Job ID b536587d8506496ea33f454ebdbe8b19</span></button></div></a><div aria-labelledby="job_list___sub_heading_1403_1" data-parent="#job_list___sub_accordion_1403" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1403_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=609" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (609, 11), end pos: (609, 18)</button></a></pre><pre>operator: core/AddNot, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 5836: invalid start byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1404"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1404_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1404_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1404_1"><button class="btn btn-outline-success"><span class="job_id">1404 : Job ID 51f2f8bd518f441f87024905fd8d1f9f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1404_1" data-parent="#job_list___sub_accordion_1404" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1404_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=629" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (629, 11), end pos: (629, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -626,7 +626,7 @@ ) return jsonify({"error": "document path invalid"}), 500 - if not resolved.exists(): + if not not resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:630 File missing on disk for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1405"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1405_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1405_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1405_1"><button class="btn btn-outline-success"><span class="job_id">1405 : Job ID aabc4286d46149cea86b7d7c85cdf769</span></button></div></a><div aria-labelledby="job_list___sub_heading_1405_1" data-parent="#job_list___sub_accordion_1405" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1405_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=643" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (643, 15), end pos: (643, 31)</button></a></pre><pre>operator: core/AddNot, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -640,7 +640,7 @@ try: # Quick PDF signature check head = f.read(5) - if head != b"%PDF-": + if not head != b"%PDF-": f.close() app.logger.warning( "Invalid PDF signature for document id=%s", document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T224817642818Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T224818541971Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1406"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1406_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1406_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1406_1"><button class="btn btn-outline-danger"><span class="job_id">1406 : Job ID edaeac7fcb3c47c0b272a207f9f1eb7b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1406_1" data-parent="#job_list___sub_accordion_1406" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1406_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=654" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (654, 15), end pos: (654, 48)</button></a></pre><pre>operator: core/AddNot, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -651,7 +651,7 @@ # Prepare safe filename (preserve existing .pdf if present) name = (row.name or "document").strip().replace("\r", "").replace("\n", "") - if not name.lower().endswith(".pdf"): + if not not name.lower().endswith(".pdf"): name = f"{name}.pdf" # Stat via the same FD to avoid TOCTOU</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1407"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1407_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1407_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1407_1"><button class="btn btn-outline-danger"><span class="job_id">1407 : Job ID ef368754de014c1a8039c22b8bbddec6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1407_1" data-parent="#job_list___sub_accordion_1407" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1407_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=671" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (671, 15), end pos: (671, 65)</button></a></pre><pre>operator: core/AddNot, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -668,7 +668,7 @@ ) # Strong validator - if isinstance(row.sha256_hex, str) and row.sha256_hex: + if not isinstance(row.sha256_hex, str) and row.sha256_hex: resp.set_etag(row.sha256_hex.lower()) # Headers</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1408"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1408_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1408_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1408_1"><button class="btn btn-outline-success"><span class="job_id">1408 : Job ID 431d64569d6641c095b1554721431b22</span></button></div></a><div aria-labelledby="job_list___sub_heading_1408_1" data-parent="#job_list___sub_accordion_1408" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1408_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=696" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (696, 11), end pos: (696, 63)</button></a></pre><pre>operator: core/AddNot, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -693,7 +693,7 @@ @app.get("/api/get-version/&lt;link&gt;") def get_version(link: str): # Accept both 32-char (RMAP session secrets) and 64-char (SHA-256 style) tokens - if not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): + if not not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): app.logger.warning("Invalid version link format: %s", link) return jsonify({"error": "document not found"}), 404 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e9a81059278ef320e'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:697 Invalid version link format: 0000000000bc614e9a81059278ef320e ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1409"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1409_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1409_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1409_1"><button class="btn btn-outline-success"><span class="job_id">1409 : Job ID 3b64305d97e24f8caffeff9cf40a7db4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1409_1" data-parent="#job_list___sub_accordion_1409" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1409_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=718" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (718, 11), end pos: (718, 18)</button></a></pre><pre>operator: core/AddNot, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -715,7 +715,7 @@ inc_db_error("get_version") return jsonify({"error": "database error"}), 503 - if not row: + if not not row: app.logger.warning("Version not found for link: %s", link) return jsonify({"error": "document not found"}), 404 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e8239366f32f41753'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:719 Version not found for link: 0000000000bc614e8239366f32f41753 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1410"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1410_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1410_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1410_1"><button class="btn btn-outline-success"><span class="job_id">1410 : Job ID 8b67695c8e7d4674881bcc06ddb25df7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1410_1" data-parent="#job_list___sub_accordion_1410" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1410_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=730" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (730, 11), end pos: (730, 32)</button></a></pre><pre>operator: core/AddNot, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -727,7 +727,7 @@ ) return jsonify({"error": "document path invalid"}), 500 - if not resolved.exists(): + if not not resolved.exists(): app.logger.error("File missing on disk for version link=%s", link) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614eab52385dc4a4c4d5'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:731 File missing on disk for version link=0000000000bc614eab52385dc4a4c4d5 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1411"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1411_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1411_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1411_1"><button class="btn btn-outline-success"><span class="job_id">1411 : Job ID 13c428e2e9f7467381f788bdefc31cf9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1411_1" data-parent="#job_list___sub_accordion_1411" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1411_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=737" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (737, 19), end pos: (737, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -734,7 +734,7 @@ try: with resolved.open("rb") as fh: header = fh.read(5) - if header != b"%PDF-": + if not header != b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link )</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ee32507434664a7f1'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614ee32507434664a7f1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1412"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1412_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1412_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1412_1"><button class="btn btn-outline-danger"><span class="job_id">1412 : Job ID bec5b23878a6423db05f2376f4dd00cf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1412_1" data-parent="#job_list___sub_accordion_1412" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1412_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=752" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (752, 24), end pos: (752, 57)</button></a></pre><pre>operator: core/AddNot, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -749,7 +749,7 @@ return jsonify({"error": "error serving file"}), 500 download_name = ( - row.link if row.link.lower().endswith(".pdf") else f"{row.link}.pdf" + row.link if not row.link.lower().endswith(".pdf") else f"{row.link}.pdf" ) safe_download = download_name.replace("\r", "").replace("\n", "") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1413"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1413_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1413_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1413_1"><button class="btn btn-outline-danger"><span class="job_id">1413 : Job ID 1df5d8a9d91d4bf0bae818e782b6cb98</span></button></div></a><div aria-labelledby="job_list___sub_heading_1413_1" data-parent="#job_list___sub_accordion_1413" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1413_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=784" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (784, 11), end pos: (784, 31)</button></a></pre><pre>operator: core/AddNot, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -781,7 +781,7 @@ def _safe_resolve_under_storage(p: str, storage_root: Path) -&gt; Path: storage_root = storage_root.resolve() fp = Path(p) - if not fp.is_absolute(): + if not not fp.is_absolute(): fp = storage_root / fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1414"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1414_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1414_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1414_1"><button class="btn btn-outline-danger"><span class="job_id">1414 : Job ID 816e8ed4411f4e5ab5be9ec947f30c7e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1414_1" data-parent="#job_list___sub_accordion_1414" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1414_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=788" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (788, 11), end pos: (788, 40)</button></a></pre><pre>operator: core/AddNot, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -785,7 +785,7 @@ fp = storage_root / fp fp = fp.resolve() # Python 3.12 has is_relative_to on Path - if hasattr(fp, "is_relative_to"): + if not hasattr(fp, "is_relative_to"): if not fp.is_relative_to(storage_root): raise RuntimeError(f"path {fp} escapes storage root {storage_root}") else:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1415"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1415_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1415_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1415_1"><button class="btn btn-outline-success"><span class="job_id">1415 : Job ID bd99726db8504c14b550b32fc07a2e65</span></button></div></a><div aria-labelledby="job_list___sub_heading_1415_1" data-parent="#job_list___sub_accordion_1415" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1415_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=789" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (789, 15), end pos: (789, 50)</button></a></pre><pre>operator: core/AddNot, occurrence: 47</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -786,7 +786,7 @@ fp = fp.resolve() # Python 3.12 has is_relative_to on Path if hasattr(fp, "is_relative_to"): - if not fp.is_relative_to(storage_root): + if not not fp.is_relative_to(storage_root): raise RuntimeError(f"path {fp} escapes storage root {storage_root}") else: try:</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e1e2f0a6102372cfb'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:725 Rejected version path for link 0000000000bc614e1e2f0a6102372cfb: C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\rmap_watermarks\rmap_0000000000bc614e1e2f0a6102372cfb.pdf (path C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\rmap_watermarks\rmap_0000000000bc614e1e2f0a6102372cfb.pdf escapes storage root C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1416"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1416_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1416_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1416_1"><button class="btn btn-outline-success"><span class="job_id">1416 : Job ID 226e53fb710c4180a6a210af9482d976</span></button></div></a><div aria-labelledby="job_list___sub_heading_1416_1" data-parent="#job_list___sub_accordion_1416" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1416_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=806" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (806, 11), end pos: (806, 36)</button></a></pre><pre>operator: core/AddNot, occurrence: 48</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -803,7 +803,7 @@ @require_auth def delete_document(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST - if document_id in (None, ""): + if not document_id in (None, ""): document_id = ( request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:814 Document id required for deletion ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1417"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1417_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1417_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1417_1"><button class="btn btn-outline-success"><span class="job_id">1417 : Job ID 553a93c2563e4583b50e94fcb61b161e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1417_1" data-parent="#job_list___sub_accordion_1417" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1417_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=813" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (813, 11), end pos: (813, 30)</button></a></pre><pre>operator: core/AddNot, occurrence: 49</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -810,7 +810,7 @@ or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) - if document_id is None: + if not document_id is None: app.logger.warning("Document id required for deletion") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:814 Document id required for deletion ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1418"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1418_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1418_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1418_1"><button class="btn btn-outline-success"><span class="job_id">1418 : Job ID a86dea1b256642fe9a85406eca5adf14</span></button></div></a><div aria-labelledby="job_list___sub_heading_1418_1" data-parent="#job_list___sub_accordion_1418" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1418_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 11), end pos: (823, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 50</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if not doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1419"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1419_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1419_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1419_1"><button class="btn btn-outline-success"><span class="job_id">1419 : Job ID 985de3d821e54fbb8b8da64fc232e856</span></button></div></a><div aria-labelledby="job_list___sub_heading_1419_1" data-parent="#job_list___sub_accordion_1419" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1419_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=848" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (848, 11), end pos: (848, 18)</button></a></pre><pre>operator: core/AddNot, occurrence: 51</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -845,7 +845,7 @@ inc_db_error("delete_document_select") return jsonify({"error": "database error during delete"}), 503 - if not row: + if not not row: # DonÔÇÖt reveal othersÔÇÖ docsÔÇöjust say not found app.logger.warning( "Document not found or access denied for deletion id=%s", doc_id</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1420"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1420_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1420_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1420_1"><button class="btn btn-outline-danger"><span class="job_id">1420 : Job ID c87a83f8862b4236852b40993aa47ce4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1420_1" data-parent="#job_list___sub_accordion_1420" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1420_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=862" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (862, 15), end pos: (862, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 52</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -859,7 +859,7 @@ delete_error = None try: fp = _safe_resolve_under_storage(row.path, storage_root) - if fp.exists(): + if not fp.exists(): try: fp.unlink() file_deleted = True</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1421"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1421_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1421_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1421_1"><button class="btn btn-outline-success"><span class="job_id">1421 : Job ID b6a39b1c61f94fdba3e99b157e9aa87a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1421_1" data-parent="#job_list___sub_accordion_1421" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1421_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=911" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (911, 11), end pos: (911, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 53</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -908,7 +908,7 @@ @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET - if not document_id: + if not not document_id: document_id = ( request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1422"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1422_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1422_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1422_1"><button class="btn btn-outline-success"><span class="job_id">1422 : Job ID 25ae7d8412eb4514b12e1429e612f0c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1422_1" data-parent="#job_list___sub_accordion_1422" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1422_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=933" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (933, 15), end pos: (933, 29)</button></a></pre><pre>operator: core/AddNot, occurrence: 54</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -930,7 +930,7 @@ # validate input try: - if doc_id is None: + if not doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143228907413Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143229772655Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1423"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1423_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1423_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1423_1"><button class="btn btn-outline-success"><span class="job_id">1423 : Job ID 9670439189a949c080e3cba43baf17b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1423_1" data-parent="#job_list___sub_accordion_1423" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1423_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 15), end pos: (937, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 55</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if not doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1424"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1424_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1424_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1424_1"><button class="btn btn-outline-success"><span class="job_id">1424 : Job ID 451dc25cf76a4cd384aa56c563e34eaa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1424_1" data-parent="#job_list___sub_accordion_1424" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1424_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=942" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (942, 11), end pos: (947, 9)</button></a></pre><pre>operator: core/AddNot, occurrence: 56</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -939,7 +939,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if ( + if not ( not method or not intended_for or not isinstance(secret, str)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122919412704Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T122920341681Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 21.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1425"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1425_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1425_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1425_1"><button class="btn btn-outline-success"><span class="job_id">1425 : Job ID cd8d68ac1f2947ce8c4878b91bb099e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1425_1" data-parent="#job_list___sub_accordion_1425" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1425_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=971" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (971, 11), end pos: (971, 18)</button></a></pre><pre>operator: core/AddNot, occurrence: 57</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -968,7 +968,7 @@ app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 - if not row: + if not not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id )</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 1 failed, 41 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1426"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1426_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1426_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1426_1"><button class="btn btn-outline-danger"><span class="job_id">1426 : Job ID d7acc6e3472246fba5d03be3c0d61a05</span></button></div></a><div aria-labelledby="job_list___sub_heading_1426_1" data-parent="#job_list___sub_accordion_1426" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1426_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=980" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (980, 11), end pos: (980, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 58</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -977,7 +977,7 @@ # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) - if not file_path.is_absolute(): + if not not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1427"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1427_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1427_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1427_1"><button class="btn btn-outline-success"><span class="job_id">1427 : Job ID f166357377f54a9dacd18543bb2a7965</span></button></div></a><div aria-labelledby="job_list___sub_heading_1427_1" data-parent="#job_list___sub_accordion_1427" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1427_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=988" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (988, 11), end pos: (988, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 59</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -985,7 +985,7 @@ except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 - if not file_path.exists(): + if not not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 410 == 201 E + where 410 = &lt;WrapperTestResponse 33 bytes [410 GONE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:989 File missing on disk for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 410 == 201 1 failed, 41 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1428"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1428_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1428_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1428_1"><button class="btn btn-outline-success"><span class="job_id">1428 : Job ID dbc05ea18a90403a873f9b5296d08391</span></button></div></a><div aria-labelledby="job_list___sub_heading_1428_1" data-parent="#job_list___sub_accordion_1428" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1428_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 15), end pos: (997, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 60</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if not applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1429"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1429_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1429_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1429_1"><button class="btn btn-outline-success"><span class="job_id">1429 : Job ID f365ac5dee3c4fbebd1bfcbfec937249</span></button></div></a><div aria-labelledby="job_list___sub_heading_1429_1" data-parent="#job_list___sub_accordion_1429" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1429_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 15), end pos: (1024, 82)</button></a></pre><pre>operator: core/AddNot, occurrence: 61</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse 44 bytes [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1026 Watermarking produced no output for document 1 using method robust-xmp ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 1 failed, 41 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1430"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1430_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1430_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1430_1"><button class="btn btn-outline-success"><span class="job_id">1430 : Job ID aaf95fe691f0410f8603e00f6e2bfd21</span></button></div></a><div aria-labelledby="job_list___sub_heading_1430_1" data-parent="#job_list___sub_accordion_1430" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1430_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1148" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1148, 11), end pos: (1148, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 62</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1145,7 +1145,7 @@ @require_auth def read_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST - if not document_id: + if not not document_id: document_id = ( request.args.get("id") or request.args.get("documentid")</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1431"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1431_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1431_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1431_1"><button class="btn btn-outline-success"><span class="job_id">1431 : Job ID 22445de914a84518ae2b0dd9068cc2f9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1431_1" data-parent="#job_list___sub_accordion_1431" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1431_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1168" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1168, 15), end pos: (1168, 29)</button></a></pre><pre>operator: core/AddNot, occurrence: 63</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1165,7 +1165,7 @@ # validate input try: - if doc_id is None: + if not doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1432"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1432_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1432_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1432_1"><button class="btn btn-outline-success"><span class="job_id">1432 : Job ID b939fa1a7cb54ca0ae300e5796e5add5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1432_1" data-parent="#job_list___sub_accordion_1432" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1432_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 15), end pos: (1172, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 64</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if not doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1433"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1433_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1433_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1433_1"><button class="btn btn-outline-success"><span class="job_id">1433 : Job ID 270d8f4d479642708bf4dfb3a5492e0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1433_1" data-parent="#job_list___sub_accordion_1433" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1433_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 11), end pos: (1177, 80)</button></a></pre><pre>operator: core/AddNot, occurrence: 65</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if not not method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 41 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1178 Missing required fields for watermarking: {'id': 2, 'key': 'strong-password', 'method': 'overlay-watermark', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1434"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1434_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1434_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1434_1"><button class="btn btn-outline-success"><span class="job_id">1434 : Job ID 57e4bac08aeb446dba7ba0e15f56131c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1434_1" data-parent="#job_list___sub_accordion_1434" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1434_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1201" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1201, 11), end pos: (1201, 18)</button></a></pre><pre>operator: core/AddNot, occurrence: 66</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1198,7 +1198,7 @@ ) return jsonify({"error": "database error"}), 503 - if not row: + if not not row: app.logger.warning( "Document not found or access denied for watermark read id=%s", doc_id )</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 404 == 201 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1435"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1435_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1435_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1435_1"><button class="btn btn-outline-danger"><span class="job_id">1435 : Job ID f1ba716f1b0a4e5a8ec3e41698b8922a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1435_1" data-parent="#job_list___sub_accordion_1435" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1435_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1210" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1210, 11), end pos: (1210, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 67</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1207,7 +1207,7 @@ # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) - if not file_path.is_absolute(): + if not not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1436"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1436_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1436_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1436_1"><button class="btn btn-outline-success"><span class="job_id">1436 : Job ID 538a0415df4d46f3a0edd92c85d8f446</span></button></div></a><div aria-labelledby="job_list___sub_heading_1436_1" data-parent="#job_list___sub_accordion_1436" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1436_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1218" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1218, 11), end pos: (1218, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 68</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1215,7 +1215,7 @@ except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 - if not file_path.exists(): + if not not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 410 == 201 E + where 410 = &lt;WrapperTestResponse 33 bytes [410 GONE]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1219 File missing on disk for document id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 410 == 201 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1437"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1437_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1437_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1437_1"><button class="btn btn-outline-danger"><span class="job_id">1437 : Job ID aaae3a0514924be08d2b1c92e50f371e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1437_1" data-parent="#job_list___sub_accordion_1437" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1437_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1243" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1243, 11), end pos: (1243, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 69</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1240,7 +1240,7 @@ def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") - if provided != token_required: + if not provided != token_required: return False return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1438"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1438_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1438_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1438_1"><button class="btn btn-outline-danger"><span class="job_id">1438 : Job ID 25c5bdf4ef6d44d1b61769852d158f9e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1438_1" data-parent="#job_list___sub_accordion_1438" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1438_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1249" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1249, 11), end pos: (1249, 47)</button></a></pre><pre>operator: core/AddNot, occurrence: 70</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1246,7 +1246,7 @@ @app.get("/metrics") def metrics(): - if not _is_authorized_metrics_request(): + if not not _is_authorized_metrics_request(): # Obscure existence a bit ÔÇô return 404 instead of 403 to casual scans app.logger.warning( "Unauthorized metrics access attempt from %s", request.remote_addr</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1439"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1439_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1439_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1439_1"><button class="btn btn-outline-success"><span class="job_id">1439 : Job ID baf1f1c29ce444c6a9f04594b9a4d287</span></button></div></a><div aria-labelledby="job_list___sub_heading_1439_1" data-parent="#job_list___sub_accordion_1439" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1439_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1264" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1264, 3), end pos: (1264, 25)</button></a></pre><pre>operator: core/AddNot, occurrence: 71</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1261,7 +1261,7 @@ # WSGI entrypoint app = create_app() -if __name__ == "__main__": +if not __name__ == "__main__": port = int(os.environ.get("PORT", 5000)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1")</pre></div><div class="alert alert-secondary"><pre class="diff">timeout</pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1440"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1440_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1440_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1440_1"><button class="btn btn-outline-danger"><span class="job_id">1440 : Job ID 279f2f5af7984f148897265da747c388</span></button></div></a><div aria-labelledby="job_list___sub_heading_1440_1" data-parent="#job_list___sub_accordion_1440" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1440_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=62" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (62, 44), end pos: (62, 48)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -59,7 +59,7 @@ app.config["DB_PORT"] = int(os.environ.get("DB_PORT", "3306")) app.config["DB_NAME"] = os.environ.get("DB_NAME", "tatou") - app.config["STORAGE_DIR"].mkdir(parents=True, exist_ok=True) + app.config["STORAGE_DIR"].mkdir(parents=False, exist_ok=True) app.config["TESTING"] = os.environ.get("TESTING", False) # --- DB engine only (no Table metadata) ---</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1441"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1441_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1441_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_1441_1"><button class="btn btn-outline-info"><span class="job_id">1441 : Job ID d358c1e1a08f42dbae77f22b26f79be4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1441_1" data-parent="#job_list___sub_accordion_1441" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1441_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=62" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (62, 59), end pos: (62, 63)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 2. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 605: invalid continuation byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1442"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1442_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1442_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1442_1"><button class="btn btn-outline-danger"><span class="job_id">1442 : Job ID 942d0ddcea434ccca7f31978fa7b8146</span></button></div></a><div aria-labelledby="job_list___sub_heading_1442_1" data-parent="#job_list___sub_accordion_1442" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1442_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (76, 60), end pos: (76, 64)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -73,7 +73,7 @@ eng = app.config.get("_ENGINE") if eng is None: try: - eng = create_engine(db_url(), pool_pre_ping=True, future=True) + eng = create_engine(db_url(), pool_pre_ping=False, future=True) except Exception as e: app.logger.critical("Failed to initialize database engine: %s", e) raise</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1443"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1443_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1443_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1443_1"><button class="btn btn-outline-success"><span class="job_id">1443 : Job ID d1543b8ad1c94877af426630f2c09f95</span></button></div></a><div aria-labelledby="job_list___sub_heading_1443_1" data-parent="#job_list___sub_accordion_1443" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1443_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (76, 73), end pos: (76, 77)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -73,7 +73,7 @@ eng = app.config.get("_ENGINE") if eng is None: try: - eng = create_engine(db_url(), pool_pre_ping=True, future=True) + eng = create_engine(db_url(), pool_pre_ping=True, future=False) except Exception as e: app.logger.critical("Failed to initialize database engine: %s", e) raise</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:236 Database error in create_user: The 'future' parameter passed to create_engine() may only be set to True. ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:280 Database error in login: The 'future' parameter passed to create_engine() may only be set to True. _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113141022542Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:968 Database error fetching document The 'future' parameter passed to create_engine() may only be set to True. __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113141759089Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:844 DB delete error for doc id=2: The 'future' parameter passed to create_engine() may only be set to True. _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ERROR server:server.py:236 Database error in create_user: The 'future' parameter passed to create_engine() may only be set to True. CRITICAL server:server.py:78 Failed to initialize database engine: The 'future' parameter passed to create_engine() may only be set to True. ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 19.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1444"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1444_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1444_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1444_1"><button class="btn btn-outline-danger"><span class="job_id">1444 : Job ID 17a3f4cf10f04aaca3a282e6c17ea182</span></button></div></a><div aria-labelledby="job_list___sub_heading_1444_1" data-parent="#job_list___sub_accordion_1444" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1444_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=178" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (178, 20), end pos: (178, 24)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -175,7 +175,7 @@ try: with get_engine().connect() as conn: conn.execute(text("SELECT 1")) - db_ok = True + db_ok = False except Exception: db_ok = False return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1445"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1445_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1445_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1445_1"><button class="btn btn-outline-success"><span class="job_id">1445 : Job ID e938a7af16e7406196570035fd12c2db</span></button></div></a><div aria-labelledby="job_list___sub_heading_1445_1" data-parent="#job_list___sub_accordion_1445" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1445_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (194, 15), end pos: (194, 19)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -191,7 +191,7 @@ return False, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format" - return True, "" + return False, "" # POST /api/create-user {email, login, password} @app.post("/api/create-user")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 13 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192136793682Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192137708058Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:213 User input validation failed: ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1446"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1446_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1446_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1446_1"><button class="btn btn-outline-danger"><span class="job_id">1446 : Job ID 2450720a6f62480db1c59d47d16a7ae4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1446_1" data-parent="#job_list___sub_accordion_1446" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1446_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=199" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (199, 42), end pos: (199, 46)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -196,7 +196,7 @@ # POST /api/create-user {email, login, password} @app.post("/api/create-user") def create_user(): - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} email = (payload.get("email") or "").strip().lower() login = (payload.get("login") or "").strip() password = payload.get("password") or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1447"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1447_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1447_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1447_1"><button class="btn btn-outline-danger"><span class="job_id">1447 : Job ID 5107691ec24f4f33833885e071714e89</span></button></div></a><div aria-labelledby="job_list___sub_heading_1447_1" data-parent="#job_list___sub_accordion_1447" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1447_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=244" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (244, 42), end pos: (244, 46)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -241,7 +241,7 @@ # POST /api/login {login, password} @app.post("/api/login") def login(): - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1448"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1448_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1448_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1448_1"><button class="btn btn-outline-danger"><span class="job_id">1448 : Job ID b1adecbbf9934921ad395b9b682deb44</span></button></div></a><div aria-labelledby="job_list___sub_heading_1448_1" data-parent="#job_list___sub_accordion_1448" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1448_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=342" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (342, 31), end pos: (342, 35)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -339,7 +339,7 @@ return jsonify({"error": "invalid filename"}), 400 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] - user_dir.mkdir(parents=True, exist_ok=True) + user_dir.mkdir(parents=False, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") final_name = request.form.get("name") or fname</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1449"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1449_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1449_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_1449_1"><button class="btn btn-outline-info"><span class="job_id">1449 : Job ID 360b8be0f0984c47a9076280d7801879</span></button></div></a><div aria-labelledby="job_list___sub_heading_1449_1" data-parent="#job_list___sub_accordion_1449" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1449_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=342" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (342, 46), end pos: (342, 50)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 6287: invalid continuation byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1450"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1450_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1450_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1450_1"><button class="btn btn-outline-danger"><span class="job_id">1450 : Job ID f9d3136cc14a4d62a75179b9455038a4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1450_1" data-parent="#job_list___sub_accordion_1450" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1450_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=392" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (392, 42), end pos: (392, 46)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -389,7 +389,7 @@ {"id": did}, ).one() except Exception: - stored_path.unlink(missing_ok=True) + stored_path.unlink(missing_ok=False) app.logger.error( "Database error inserting document path=%s user=%s", stored_path,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1451"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1451_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1451_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1451_1"><button class="btn btn-outline-danger"><span class="job_id">1451 : Job ID 7aa793df68134fe3a332819559efd875</span></button></div></a><div aria-labelledby="job_list___sub_heading_1451_1" data-parent="#job_list___sub_accordion_1451" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1451_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=762" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (762, 28), end pos: (762, 32)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -759,7 +759,7 @@ mimetype="application/pdf", as_attachment=False, download_name=safe_download, - conditional=True, + conditional=False, max_age=0, last_modified=last_modified, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1452"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1452_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1452_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1452_1"><button class="btn btn-outline-danger"><span class="job_id">1452 : Job ID 26a18f874221495eb3140774cfb6ff73</span></button></div></a><div aria-labelledby="job_list___sub_heading_1452_1" data-parent="#job_list___sub_accordion_1452" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1452_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=810" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (810, 65), end pos: (810, 69)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -807,7 +807,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=False) or {}).get("id")) ) if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1453"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1453_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1453_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1453_1"><button class="btn btn-outline-danger"><span class="job_id">1453 : Job ID 0a0736ba568e493997978309c74fc886</span></button></div></a><div aria-labelledby="job_list___sub_heading_1453_1" data-parent="#job_list___sub_accordion_1453" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1453_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=865" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (865, 35), end pos: (865, 39)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -862,7 +862,7 @@ if fp.exists(): try: fp.unlink() - file_deleted = True + file_deleted = False except Exception as e: delete_error = f"failed to delete file: {e}" app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1454"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1454_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1454_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1454_1"><button class="btn btn-outline-danger"><span class="job_id">1454 : Job ID 757dd032d8f5465ebdb3361e68791fda</span></button></div></a><div aria-labelledby="job_list___sub_heading_1454_1" data-parent="#job_list___sub_accordion_1454" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1454_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=872" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (872, 31), end pos: (872, 35)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -869,7 +869,7 @@ "Failed to delete file %s for doc id=%s: %s", fp, row.id, e ) else: - file_missing = True + file_missing = False except RuntimeError as e: # Path escapes storage root; refuse to touch the file delete_error = str(e)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1455"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1455_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1455_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1455_1"><button class="btn btn-outline-danger"><span class="job_id">1455 : Job ID 1ffd3363a6d34a5c86ccc67b854d8687</span></button></div></a><div aria-labelledby="job_list___sub_heading_1455_1" data-parent="#job_list___sub_accordion_1455" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1455_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=896" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (896, 27), end pos: (896, 31)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -893,7 +893,7 @@ return jsonify( { - "deleted": True, + "deleted": False, "id": doc_id, "file_deleted": file_deleted, "file_missing": file_missing,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1456"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1456_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1456_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1456_1"><button class="btn btn-outline-success"><span class="job_id">1456 : Job ID d59827d10e1640d0854ef3ce45dd649d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1456_1" data-parent="#job_list___sub_accordion_1456" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1456_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=915" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (915, 65), end pos: (915, 69)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -912,7 +912,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=False) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190857322224Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T190858191786Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1457"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1457_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1457_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1457_1"><button class="btn btn-outline-danger"><span class="job_id">1457 : Job ID b1d74805bd41425cae760c63224b9bf0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1457_1" data-parent="#job_list___sub_accordion_1457" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1457_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=923" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (923, 42), end pos: (923, 46)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -920,7 +920,7 @@ app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1458"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1458_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1458_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1458_1"><button class="btn btn-outline-danger"><span class="job_id">1458 : Job ID 6025711a794e41f2b238d298d5c74ca0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1458_1" data-parent="#job_list___sub_accordion_1458" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1458_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1046" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1046, 31), end pos: (1046, 35)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1043,7 +1043,7 @@ base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" - dest_dir.mkdir(parents=True, exist_ok=True) + dest_dir.mkdir(parents=False, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" dest_path = dest_dir / candidate</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1459"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1459_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1459_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-info" id="job_list___sub_heading_1459_1"><button class="btn btn-outline-info"><span class="job_id">1459 : Job ID 7f39af291f0247b5a94f243debf3f740</span></button></div></a><div aria-labelledby="job_list___sub_heading_1459_1" data-parent="#job_list___sub_accordion_1459" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1459_1"><div class="card-body"><div class="work-item"><div class="alert alert-info test-outcome" role="alert"><p>worker outcome: WorkerOutcome.EXCEPTION</p><p>test outcome: TestOutcome.INCOMPETENT</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1046" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1046, 46), end pos: (1046, 50)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 46, in run_tests proc = subprocess.run(shlex.split(command), check=True, env=env, timeout=timeout, capture_output=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pytest', '../test/test_api.py', '../test/test_watermarking_all_methods.py', '../test/test_watermarking_utilities.py']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\mutating.py", line 75, in mutate_and_test test_outcome, output = run_tests(test_command, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cosmic_ray\testing.py", line 51, in run_tests return (TestOutcome.KILLED, err.output.decode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 3971: invalid continuation byte </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1460"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1460_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1460_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1460_1"><button class="btn btn-outline-danger"><span class="job_id">1460 : Job ID b4b54af340984bc6a9402b86312d34a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1460_1" data-parent="#job_list___sub_accordion_1460" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1460_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1092" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1092, 44), end pos: (1092, 48)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1089,7 +1089,7 @@ except IntegrityError as ie: # This should be very rare due to SHA-256 usage, but handle it just in case try: - dest_path.unlink(missing_ok=True) + dest_path.unlink(missing_ok=False) except Exception as cleanup_error: app.logger.warning( f"Failed to cleanup file {dest_path}: {cleanup_error}"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1461"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1461_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1461_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1461_1"><button class="btn btn-outline-danger"><span class="job_id">1461 : Job ID 756dc06ebbd8442ba4e3232b0089163d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1461_1" data-parent="#job_list___sub_accordion_1461" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1461_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1104" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1104, 44), end pos: (1104, 48)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1101,7 +1101,7 @@ return jsonify({"error": "database error during version insert"}), 503 except Exception: try: - dest_path.unlink(missing_ok=True) + dest_path.unlink(missing_ok=False) except Exception as cleanup_error: app.logger.warning( f"Failed to cleanup file {dest_path}: {cleanup_error}"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1462"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1462_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1462_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1462_1"><button class="btn btn-outline-danger"><span class="job_id">1462 : Job ID 16290c42546045d3acae747b338fe434</span></button></div></a><div aria-labelledby="job_list___sub_heading_1462_1" data-parent="#job_list___sub_accordion_1462" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1462_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1152" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1152, 65), end pos: (1152, 69)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1149,7 +1149,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=False) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1463"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1463_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1463_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1463_1"><button class="btn btn-outline-danger"><span class="job_id">1463 : Job ID 713a2f995edf4f738b117bc136686257</span></button></div></a><div aria-labelledby="job_list___sub_heading_1463_1" data-parent="#job_list___sub_accordion_1463" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1463_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1160" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1160, 42), end pos: (1160, 46)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1157,7 +1157,7 @@ app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=False) or {} # allow a couple of aliases for convenience method = payload.get("method") position = payload.get("position") or None</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1464"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1464_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1464_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1464_1"><button class="btn btn-outline-danger"><span class="job_id">1464 : Job ID 775b164143904220b9daa5f697d47e67</span></button></div></a><div aria-labelledby="job_list___sub_heading_1464_1" data-parent="#job_list___sub_accordion_1464" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1464_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1245" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1245, 15), end pos: (1245, 19)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1242,7 +1242,7 @@ provided = request.headers.get("X-Metrics-Token", "") if provided != token_required: return False - return True + return False @app.get("/metrics") def metrics():</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1465"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1465_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1465_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1465_1"><button class="btn btn-outline-danger"><span class="job_id">1465 : Job ID 53509836ed8d4ae893eb30d38a34661a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1465_1" data-parent="#job_list___sub_accordion_1465" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1465_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=63" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (63, 54), end pos: (63, 59)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -60,7 +60,7 @@ app.config["DB_NAME"] = os.environ.get("DB_NAME", "tatou") app.config["STORAGE_DIR"].mkdir(parents=True, exist_ok=True) - app.config["TESTING"] = os.environ.get("TESTING", False) + app.config["TESTING"] = os.environ.get("TESTING", True) # --- DB engine only (no Table metadata) --- def db_url() -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1466"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1466_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1466_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1466_1"><button class="btn btn-outline-danger"><span class="job_id">1466 : Job ID ca356ea97a7c487b8ea5561cfa57983d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1466_1" data-parent="#job_list___sub_accordion_1466" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1466_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=180" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (180, 20), end pos: (180, 25)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -177,7 +177,7 @@ conn.execute(text("SELECT 1")) db_ok = True except Exception: - db_ok = False + db_ok = True return jsonify( {"message": "The server is up and running.", "db_connected": db_ok} ), 200</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1467"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1467_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1467_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1467_1"><button class="btn btn-outline-danger"><span class="job_id">1467 : Job ID 1f6e4a2ee0924158a38b04fd9ccf5500</span></button></div></a><div aria-labelledby="job_list___sub_heading_1467_1" data-parent="#job_list___sub_accordion_1467" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1467_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=189" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (189, 19), end pos: (189, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -186,7 +186,7 @@ def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" if len(email) &gt; 320 or len(login) &gt; 64: - return False, "Email or login too long" + return True, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1468"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1468_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1468_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1468_1"><button class="btn btn-outline-success"><span class="job_id">1468 : Job ID d136655a8b8244af981a112e66ef931d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1468_1" data-parent="#job_list___sub_accordion_1468" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1468_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=191" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (191, 19), end pos: (191, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -188,7 +188,7 @@ if len(email) &gt; 320 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): - return False, "Invalid email format" + return True, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format" return True, ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FF....................................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) assert resp.status_code == 400 # Missing login resp = client.post("/api/create-user", json={"email": "user@email.se", "password": "password"}, ) assert resp.status_code == 400 # Missing password resp = client.post( "/api/create-user", json={"email": "user@email.se", "login": "username"} ) assert resp.status_code == 400 # Malformed email resp = client.post("/api/create-user",json={ "email": "malformedemail", "login": "username", "password": "password", }, # pragma: allowlist secret ) &gt; assert resp.status_code == 400 E assert 201 == 400 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:114: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) assert resp.status_code == 400 # Missing password resp = client.post("/api/login", json={"email": "user@email.se"}) assert resp.status_code == 400 # Both missing resp = client.post("/api/login", json={}) assert resp.status_code == 400 # Malformed email - counts as non existing resp = client.post("/api/login", json={"email": "malformedemail", "password": "password"}) &gt; assert resp.status_code == 401 E assert 200 == 401 E + where 200 = &lt;WrapperTestResponse streamed [200 OK]&gt;.status_code ..\test\test_api.py:150: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se'} WARNING server:server.py:249 Missing fields in login attempt: {} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 201 == 400 FAILED ..\test\test_api.py::test_login_route - assert 200 == 401 2 failed, 40 passed, 23 warnings in 21.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1469"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1469_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1469_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1469_1"><button class="btn btn-outline-danger"><span class="job_id">1469 : Job ID bce4a81532a046699e84d92b1237462d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1469_1" data-parent="#job_list___sub_accordion_1469" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1469_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=193" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (193, 19), end pos: (193, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -190,7 +190,7 @@ if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format" if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): - return False, "Invalid login format" + return True, "Invalid login format" return True, "" # POST /api/create-user {email, login, password}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1470"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1470_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1470_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1470_1"><button class="btn btn-outline-success"><span class="job_id">1470 : Job ID 746e300b206f47b1bc2953b3f3b4fef0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1470_1" data-parent="#job_list___sub_accordion_1470" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1470_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=268" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (268, 31), end pos: (268, 36)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -265,7 +265,7 @@ is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time - is_valid = False + is_valid = True row = None if not is_valid:</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) assert resp.status_code == 400 # Missing password resp = client.post("/api/login", json={"email": "user@email.se"}) assert resp.status_code == 400 # Both missing resp = client.post("/api/login", json={}) assert resp.status_code == 400 # Malformed email - counts as non existing &gt; resp = client.post("/api/login", json={"email": "malformedemail", "password": "password"}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 start_db = time.time() try: with get_engine().connect() as conn: row = conn.execute( text( "SELECT id, email, login, hpassword FROM Users " "WHERE email = :email LIMIT 1" ), {"email": email}, ).first() # Constant-time comparison to prevent timing attacks if row: is_valid = check_password_hash(row.hpassword, password) else: # Dummy check to maintain constant time is_valid = True row = None if not is_valid: app.logger.warning( "Failed login attempt for email: %s", email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503 observe_db_latency("login_select", time.time() - start_db) token = _serializer().dumps( &gt; {"uid": int(row.id), "login": row.login, "email": row.email} ^^^^^^ ) E AttributeError: 'NoneType' object has no attribute 'id' server.py:286: AttributeError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se'} WARNING server:server.py:249 Missing fields in login attempt: {} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - AttributeError: 'NoneType' obj... 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1471"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1471_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1471_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1471_1"><button class="btn btn-outline-danger"><span class="job_id">1471 : Job ID 20459f0296a24af38aea07d9e2344b70</span></button></div></a><div aria-labelledby="job_list___sub_heading_1471_1" data-parent="#job_list___sub_accordion_1471" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1471_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=663" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (663, 30), end pos: (663, 35)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -660,7 +660,7 @@ resp = send_file( file_path, mimetype="application/pdf", - as_attachment=False, + as_attachment=True, download_name=name, conditional=False, # enables 304 if If-Modified-Since/Range handling max_age=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1472"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1472_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1472_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1472_1"><button class="btn btn-outline-danger"><span class="job_id">1472 : Job ID 32cf3dc62a0441b1ad366718e298e84a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1472_1" data-parent="#job_list___sub_accordion_1472" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1472_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=665" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (665, 28), end pos: (665, 33)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -662,7 +662,7 @@ mimetype="application/pdf", as_attachment=False, download_name=name, - conditional=False, # enables 304 if If-Modified-Since/Range handling + conditional=True, # enables 304 if If-Modified-Since/Range handling max_age=0, last_modified=st.st_mtime, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1473"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1473_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1473_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1473_1"><button class="btn btn-outline-danger"><span class="job_id">1473 : Job ID a741b20418db48aab0a7be778e358732</span></button></div></a><div aria-labelledby="job_list___sub_heading_1473_1" data-parent="#job_list___sub_accordion_1473" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1473_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=760" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (760, 30), end pos: (760, 35)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -757,7 +757,7 @@ resp = send_file( resolved, mimetype="application/pdf", - as_attachment=False, + as_attachment=True, download_name=safe_download, conditional=True, max_age=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1474"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1474_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1474_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1474_1"><button class="btn btn-outline-success"><span class="job_id">1474 : Job ID d470167992744da5b06363a81dc6fd5b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1474_1" data-parent="#job_list___sub_accordion_1474" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1474_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=857" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (857, 23), end pos: (857, 28)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -854,7 +854,7 @@ # Resolve and delete file (best effort) storage_root = Path(app.config["STORAGE_DIR"]) - file_deleted = False + file_deleted = True file_missing = False delete_error = None try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111402115351Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111402975838Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1475"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1475_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1475_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1475_1"><button class="btn btn-outline-danger"><span class="job_id">1475 : Job ID 98abad21e0394987b068599e0cafae84</span></button></div></a><div aria-labelledby="job_list___sub_heading_1475_1" data-parent="#job_list___sub_accordion_1475" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1475_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=858" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (858, 23), end pos: (858, 28)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -855,7 +855,7 @@ # Resolve and delete file (best effort) storage_root = Path(app.config["STORAGE_DIR"]) file_deleted = False - file_missing = False + file_missing = True delete_error = None try: fp = _safe_resolve_under_storage(row.path, storage_root)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1476"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1476_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1476_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1476_1"><button class="btn btn-outline-success"><span class="job_id">1476 : Job ID 4aca18a0631b49d8b019a0faefc986d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1476_1" data-parent="#job_list___sub_accordion_1476" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1476_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=997" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (997, 29), end pos: (997, 34)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -994,7 +994,7 @@ applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) - if applicable is False: + if applicable is True: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 47 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1477"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1477_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1477_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1477_1"><button class="btn btn-outline-danger"><span class="job_id">1477 : Job ID d381615f189645388292b4da3dba7247</span></button></div></a><div aria-labelledby="job_list___sub_heading_1477_1" data-parent="#job_list___sub_accordion_1477" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1477_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1244" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1244, 19), end pos: (1244, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1241,7 +1241,7 @@ token_required = os.environ.get("METRICS_TOKEN", "") provided = request.headers.get("X-Metrics-Token", "") if provided != token_required: - return False + return True return True @app.get("/metrics")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1478"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1478_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1478_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1478_1"><button class="btn btn-outline-danger"><span class="job_id">1478 : Job ID 0ac913ca4d16405d99e72aa451b74555</span></button></div></a><div aria-labelledby="job_list___sub_heading_1478_1" data-parent="#job_list___sub_accordion_1478" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1478_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=314" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (314, 31), end pos: (314, 34)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -311,7 +311,7 @@ start_db = time.time() # Validate file size MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB - if file.content_length and file.content_length &gt; MAX_FILE_SIZE: + if file.content_length or file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) return jsonify({"error": "file too large"}), 413</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1479"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1479_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1479_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1479_1"><button class="btn btn-outline-danger"><span class="job_id">1479 : Job ID 9a931de4f8cb4b8594df11fe1b7e0e25</span></button></div></a><div aria-labelledby="job_list___sub_heading_1479_1" data-parent="#job_list___sub_accordion_1479" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1479_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=671" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (671, 47), end pos: (671, 50)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -668,7 +668,7 @@ ) # Strong validator - if isinstance(row.sha256_hex, str) and row.sha256_hex: + if isinstance(row.sha256_hex, str) or row.sha256_hex: resp.set_etag(row.sha256_hex.lower()) # Headers</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1480"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1480_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1480_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1480_1"><button class="btn btn-outline-success"><span class="job_id">1480 : Job ID 2fb33615fc6d4ff2980594eedf77be22</span></button></div></a><div aria-labelledby="job_list___sub_heading_1480_1" data-parent="#job_list___sub_accordion_1480" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1480_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=810" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (810, 36), end pos: (810, 39)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -807,7 +807,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json or (request.get_json(silent=True) or {}).get("id")) ) if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 200 == 404 E + where 200 = &lt;WrapperTestResponse streamed [200 OK]&gt;.status_code ..\test\test_api.py:460: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 200 == 404 1 failed, 41 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1481"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1481_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1481_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1481_1"><button class="btn btn-outline-success"><span class="job_id">1481 : Job ID 2c06c6d816b34215906ba3e5128eb666</span></button></div></a><div aria-labelledby="job_list___sub_heading_1481_1" data-parent="#job_list___sub_accordion_1481" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1481_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=915" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (915, 36), end pos: (915, 39)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -912,7 +912,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json or (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) &gt; assert resp.status_code == 404 E assert 503 == 404 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:365: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 404 1 failed, 41 passed, 23 warnings in 21.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1482"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1482_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1482_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1482_1"><button class="btn btn-outline-success"><span class="job_id">1482 : Job ID df22814a66c84dbba9ade900b54d6ad8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1482_1" data-parent="#job_list___sub_accordion_1482" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1482_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1152" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1152, 36), end pos: (1152, 39)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1149,7 +1149,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json or (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values &gt; assert data.get("documentid") == parameters["id"] E AssertionError: assert 1 == 2 E + where 1 = &lt;built-in method get of dict object at 0x0000020085A94DC0&gt;('documentid') E + where &lt;built-in method get of dict object at 0x0000020085A94DC0&gt; = {'documentid': 1, 'method': 'overlay-watermark', 'position': 'metadata-only', 'secret': 'None'}.get ..\test\test_api.py:423: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1483"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1483_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1483_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1483_1"><button class="btn btn-outline-success"><span class="job_id">1483 : Job ID 193d569f12af4d319d26cd3cb3a471cc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1483_1" data-parent="#job_list___sub_accordion_1483" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1483_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 28), end pos: (188, 30)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 and len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231807011048Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231807893140Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1484"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1484_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1484_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1484_1"><button class="btn btn-outline-success"><span class="job_id">1484 : Job ID 18d7bae0df6044c9bb9d30ccb13d5fda</span></button></div></a><div aria-labelledby="job_list___sub_heading_1484_1" data-parent="#job_list___sub_accordion_1484" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1484_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=199" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (199, 48), end pos: (199, 50)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -196,7 +196,7 @@ # POST /api/create-user {email, login, password} @app.post("/api/create-user") def create_user(): - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} email = (payload.get("email") or "").strip().lower() login = (payload.get("login") or "").strip() password = payload.get("password") or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150609595359Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150610436749Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 19.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1485"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1485_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1485_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1485_1"><button class="btn btn-outline-success"><span class="job_id">1485 : Job ID aa545f94907948aab5a0ab1cd3e4fbfe</span></button></div></a><div aria-labelledby="job_list___sub_heading_1485_1" data-parent="#job_list___sub_accordion_1485" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1485_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=200" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (200, 38), end pos: (200, 40)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -197,7 +197,7 @@ @app.post("/api/create-user") def create_user(): payload = request.get_json(silent=True) or {} - email = (payload.get("email") or "").strip().lower() + email = (payload.get("email") and "").strip().lower() login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time()</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144904658323Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144905530265Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1486"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1486_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1486_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1486_1"><button class="btn btn-outline-success"><span class="job_id">1486 : Job ID ff3300501d0e4271ab22a8f5a40545c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1486_1" data-parent="#job_list___sub_accordion_1486" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1486_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (201, 38), end pos: (201, 40)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -198,7 +198,7 @@ def create_user(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip().lower() - login = (payload.get("login") or "").strip() + login = (payload.get("login") and "").strip() password = payload.get("password") or "" start_db = time.time() if not email or not login or not password:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233626443134Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233627299532Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1487"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1487_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1487_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1487_1"><button class="btn btn-outline-success"><span class="job_id">1487 : Job ID 06ec47c0787546be92a4121768ce5dcb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1487_1" data-parent="#job_list___sub_accordion_1487" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1487_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=202" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (202, 43), end pos: (202, 45)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -199,7 +199,7 @@ payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip().lower() login = (payload.get("login") or "").strip() - password = payload.get("password") or "" + password = payload.get("password") and "" start_db = time.time() if not email or not login or not password: app.logger.warning("Missing fields in user creation: %s", payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username', 'password': 'password'} ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000158057666Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000158886796Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'email': 'service@rmap.su', 'login': 'rmap_service', 'password': 'password_rmap'} ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 400 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1488"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1488_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1488_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1488_1"><button class="btn btn-outline-danger"><span class="job_id">1488 : Job ID 6d0d82c961af4e60830e232b0aabd27c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1488_1" data-parent="#job_list___sub_accordion_1488" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1488_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 21), end pos: (204, 23)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if not email and not login or not password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1489"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1489_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1489_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1489_1"><button class="btn btn-outline-success"><span class="job_id">1489 : Job ID 058c83a4099646c0b2bac65ce51f102f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1489_1" data-parent="#job_list___sub_accordion_1489" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1489_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=204" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (204, 34), end pos: (204, 36)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -201,7 +201,7 @@ login = (payload.get("login") or "").strip() password = payload.get("password") or "" start_db = time.time() - if not email or not login or not password: + if not email or not login and not password: app.logger.warning("Missing fields in user creation: %s", payload) return jsonify({"error": "email, login, and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) assert resp.status_code == 400 # Missing login resp = client.post("/api/create-user", json={"email": "user@email.se", "password": "password"}, ) assert resp.status_code == 400 # Missing password resp = client.post( "/api/create-user", json={"email": "user@email.se", "login": "username"} ) &gt; assert resp.status_code == 400 E assert 409 == 400 E + where 409 = &lt;WrapperTestResponse streamed [409 CONFLICT]&gt;.status_code ..\test\test_api.py:105: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} WARNING server:server.py:213 User input validation failed: Invalid login format WARNING server:server.py:231 Attempt to create duplicate user: email=user@email.se, login=username ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 409 == 400 1 failed, 41 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1490"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1490_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1490_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1490_1"><button class="btn btn-outline-success"><span class="job_id">1490 : Job ID 3f19975e85bb4917bb4c18ae071ae57b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1490_1" data-parent="#job_list___sub_accordion_1490" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1490_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=244" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (244, 48), end pos: (244, 50)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -241,7 +241,7 @@ # POST /api/login {login, password} @app.post("/api/login") def login(): - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} email = (payload.get("email") or "").strip() password = payload.get("password") or "" </pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1491"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1491_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1491_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1491_1"><button class="btn btn-outline-success"><span class="job_id">1491 : Job ID 88a380e8d1ec40e8b0347238a3f43f72</span></button></div></a><div aria-labelledby="job_list___sub_heading_1491_1" data-parent="#job_list___sub_accordion_1491" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1491_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=245" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (245, 38), end pos: (245, 40)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -242,7 +242,7 @@ @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} - email = (payload.get("email") or "").strip() + email = (payload.get("email") and "").strip() password = payload.get("password") or "" if not email or not password:</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1492"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1492_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1492_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1492_1"><button class="btn btn-outline-success"><span class="job_id">1492 : Job ID b9ac72a75ed7439ea4f74e4336093632</span></button></div></a><div aria-labelledby="job_list___sub_heading_1492_1" data-parent="#job_list___sub_accordion_1492" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1492_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=246" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (246, 43), end pos: (246, 45)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -243,7 +243,7 @@ def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip() - password = payload.get("password") or "" + password = payload.get("password") and "" if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 44 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se', 'password': 'password'} _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214057826394Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T214058666824Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 400 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1493"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1493_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1493_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1493_1"><button class="btn btn-outline-success"><span class="job_id">1493 : Job ID 143ade6a67b94508b2e1541e661b6e50</span></button></div></a><div aria-labelledby="job_list___sub_heading_1493_1" data-parent="#job_list___sub_accordion_1493" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1493_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=248" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (248, 21), end pos: (248, 23)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -245,7 +245,7 @@ email = (payload.get("email") or "").strip() password = payload.get("password") or "" - if not email or not password: + if not email and not password: app.logger.warning("Missing fields in login attempt: %s", payload) return jsonify({"error": "email and password are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:141: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: &lt;empty&gt; ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1494"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1494_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1494_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1494_1"><button class="btn btn-outline-danger"><span class="job_id">1494 : Job ID 8f13d98a989645e88280b080231ef6bf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1494_1" data-parent="#job_list___sub_accordion_1494" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1494_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (307, 20), end pos: (307, 22)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -304,7 +304,7 @@ return jsonify({"error": "file is required (multipart/form-data)"}), 400 file = request.files["file"] - if not file or file.filename == "": + if not file and file.filename == "": app.logger.warning("Upload attempt with empty filename") return jsonify({"error": "empty filename"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1495"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1495_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1495_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1495_1"><button class="btn btn-outline-success"><span class="job_id">1495 : Job ID 78a57157a0cc432a99fae9ece199e4d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1495_1" data-parent="#job_list___sub_accordion_1495" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1495_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=345" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (345, 46), end pos: (345, 48)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -342,7 +342,7 @@ user_dir.mkdir(parents=True, exist_ok=True) ts = dt.datetime.now(dt.UTC).strftime("%Y%m%dT%H%M%S%fZ") - final_name = request.form.get("name") or fname + final_name = request.form.get("name") and fname stored_name = f"{ts}__{fname}" try:</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value &gt; assert resp_data.get("name") == parameters["name"] E AssertionError: assert 'input.pdf' == 'My File' E E - My File E + input.pdf ..\test\test_api.py:176: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - AssertionError: asse... 1 failed, 41 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1496"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1496_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1496_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1496_1"><button class="btn btn-outline-success"><span class="job_id">1496 : Job ID 1d797b3d17e84c979b3be0f5a1bdd809</span></button></div></a><div aria-labelledby="job_list___sub_heading_1496_1" data-parent="#job_list___sub_accordion_1496" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1496_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=459" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (459, 49), end pos: (459, 51)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -456,7 +456,7 @@ def list_versions(document_id: int | None = None): # Input validation if document_id is None: - document_id = request.args.get("id") or request.args.get("documentid") + document_id = request.args.get("id") and request.args.get("documentid") try: document_id = int(document_id) if document_id else None if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1497"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1497_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1497_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1497_1"><button class="btn btn-outline-danger"><span class="job_id">1497 : Job ID 5c8b68fde8734e298af3e482990cbf82</span></button></div></a><div aria-labelledby="job_list___sub_heading_1497_1" data-parent="#job_list___sub_accordion_1497" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1497_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 39), end pos: (462, 41)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None and document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1498"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1498_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1498_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1498_1"><button class="btn btn-outline-danger"><span class="job_id">1498 : Job ID 1f0c0d434e4a4392aeb3150c6bda93bf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1498_1" data-parent="#job_list___sub_accordion_1498" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1498_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 59), end pos: (462, 61)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 and document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1499"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1499_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1499_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1499_1"><button class="btn btn-outline-success"><span class="job_id">1499 : Job ID 71a46bad76564b11992f32363b0da472</span></button></div></a><div aria-labelledby="job_list___sub_heading_1499_1" data-parent="#job_list___sub_accordion_1499" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1499_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 31), end pos: (469, 33)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None and document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T155358535914Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T155359430167Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1500"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1500_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1500_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1500_1"><button class="btn btn-outline-success"><span class="job_id">1500 : Job ID 71815428c8d34aecb225bf05d70279ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_1500_1" data-parent="#job_list___sub_accordion_1500" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1500_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 51), end pos: (469, 53)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 and document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135635378142Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135636211957Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1501"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1501_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1501_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1501_1"><button class="btn btn-outline-success"><span class="job_id">1501 : Job ID a1f7fbde2bad41aa895f886a1adbeb0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1501_1" data-parent="#job_list___sub_accordion_1501" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1501_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=529" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (529, 26), end pos: (529, 28)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -526,7 +526,7 @@ def list_all_versions(): try: # Validate user data from auth token - if not g.user or not g.user.get("id"): + if not g.user and not g.user.get("id"): app.logger.error("Missing user info in auth token") return jsonify({"error": "Invalid authentication"}), 401 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213216200890Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213217052643Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1502"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1502_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1502_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1502_1"><button class="btn btn-outline-success"><span class="job_id">1502 : Job ID 7ace655f52a94f8182452f859a4ac405</span></button></div></a><div aria-labelledby="job_list___sub_heading_1502_1" data-parent="#job_list___sub_accordion_1502" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1502_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=576" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (576, 49), end pos: (576, 51)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -573,7 +573,7 @@ def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: - document_id = request.args.get("id") or request.args.get("documentid") + document_id = request.args.get("id") and request.args.get("documentid") try: document_id = int(document_id) except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1503"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1503_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1503_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1503_1"><button class="btn btn-outline-danger"><span class="job_id">1503 : Job ID 827391beb934429d89316b87ec832639</span></button></div></a><div aria-labelledby="job_list___sub_heading_1503_1" data-parent="#job_list___sub_accordion_1503" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1503_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 31), end pos: (583, 33)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None and document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1504"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1504_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1504_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1504_1"><button class="btn btn-outline-danger"><span class="job_id">1504 : Job ID 078e424ec5b140aeaefa1877bd200f0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1504_1" data-parent="#job_list___sub_accordion_1504" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1504_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 51), end pos: (583, 53)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 0 and document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1505"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1505_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1505_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1505_1"><button class="btn btn-outline-danger"><span class="job_id">1505 : Job ID a365e4e5c631471a8590778be73e231e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1505_1" data-parent="#job_list___sub_accordion_1505" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1505_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=653" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (653, 29), end pos: (653, 31)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -650,7 +650,7 @@ f.seek(0) # Prepare safe filename (preserve existing .pdf if present) - name = (row.name or "document").strip().replace("\r", "").replace("\n", "") + name = (row.name and "document").strip().replace("\r", "").replace("\n", "") if not name.lower().endswith(".pdf"): name = f"{name}.pdf" </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1506"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1506_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1506_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1506_1"><button class="btn btn-outline-danger"><span class="job_id">1506 : Job ID cc3d45a7fadd493eb40b356905b9653f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1506_1" data-parent="#job_list___sub_accordion_1506" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1506_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=809" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (809, 16), end pos: (809, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -806,7 +806,7 @@ if document_id in (None, ""): document_id = ( request.args.get("id") - or request.args.get("documentid") + and request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1507"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1507_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1507_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1507_1"><button class="btn btn-outline-success"><span class="job_id">1507 : Job ID 37c1abf58e7c4ead997b2fb20cc67ac2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1507_1" data-parent="#job_list___sub_accordion_1507" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1507_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=810" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (810, 16), end pos: (810, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -807,7 +807,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + and (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:814 Document id required for deletion ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1508"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1508_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1508_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1508_1"><button class="btn btn-outline-success"><span class="job_id">1508 : Job ID 309c38f497ac447e979e2af4a2e5a3ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_1508_1" data-parent="#job_list___sub_accordion_1508" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1508_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=810" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (810, 71), end pos: (810, 73)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -807,7 +807,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=True) and {}).get("id")) ) if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001040485116Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T001041339371Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:814 Document id required for deletion ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 10 failed, 32 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1509"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1509_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1509_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1509_1"><button class="btn btn-outline-success"><span class="job_id">1509 : Job ID 495e1cb069c84539b9deae15a65e3769</span></button></div></a><div aria-labelledby="job_list___sub_heading_1509_1" data-parent="#job_list___sub_accordion_1509" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1509_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 23), end pos: (823, 25)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 and doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222401504212Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T222402401969Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1510"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1510_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1510_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1510_1"><button class="btn btn-outline-danger"><span class="job_id">1510 : Job ID 00e938ddf0a7467abc73409fed2de6f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1510_1" data-parent="#job_list___sub_accordion_1510" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1510_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=914" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (914, 16), end pos: (914, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -911,7 +911,7 @@ if not document_id: document_id = ( request.args.get("id") - or request.args.get("documentid") + and request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1511"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1511_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1511_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1511_1"><button class="btn btn-outline-success"><span class="job_id">1511 : Job ID a15cb6c1cc714543a3bcdcda30473f9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1511_1" data-parent="#job_list___sub_accordion_1511" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1511_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=915" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (915, 16), end pos: (915, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -912,7 +912,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + and (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1512"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1512_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1512_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1512_1"><button class="btn btn-outline-success"><span class="job_id">1512 : Job ID 6f2dfe1ce0f345a097bbdf32da7ff7a8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1512_1" data-parent="#job_list___sub_accordion_1512" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1512_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=915" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (915, 71), end pos: (915, 73)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -912,7 +912,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=True) and {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1513"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1513_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1513_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1513_1"><button class="btn btn-outline-success"><span class="job_id">1513 : Job ID 5e5cc577c7b34e0f9f6c1045fa03111e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1513_1" data-parent="#job_list___sub_accordion_1513" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1513_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=923" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (923, 48), end pos: (923, 50)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -920,7 +920,7 @@ app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 63 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:948 Missing required fields for watermarking: {} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1514"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1514_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1514_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1514_1"><button class="btn btn-outline-success"><span class="job_id">1514 : Job ID 9fe14dfb9bf34a728e407950435be48a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1514_1" data-parent="#job_list___sub_accordion_1514" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1514_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=927" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (927, 43), end pos: (927, 45)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -924,7 +924,7 @@ # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") - position = payload.get("position") or None + position = payload.get("position") and None secret = payload.get("secret") key = payload.get("key") </pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) &gt; assert isinstance(data.get("position"), str) E AssertionError: assert False E + where False = isinstance(None, str) E + where None = &lt;built-in method get of dict object at 0x00000245810F0640&gt;('position') E + where &lt;built-in method get of dict object at 0x00000245810F0640&gt; = {'documentid': 1, 'filename': 'My File__Mickey_Mouse.pdf', 'id': 1, 'intended_for': 'Mickey Mouse', ...}.get ..\test\test_api.py:345: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - AssertionError: ass... 1 failed, 41 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1515"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1515_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1515_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1515_1"><button class="btn btn-outline-danger"><span class="job_id">1515 : Job ID adc6c7d5393e4bc09da157c45af8e4c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1515_1" data-parent="#job_list___sub_accordion_1515" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1515_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 27), end pos: (937, 29)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 and doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1516"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1516_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1516_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1516_1"><button class="btn btn-outline-success"><span class="job_id">1516 : Job ID be473d83823046abb829aaf33f318886</span></button></div></a><div aria-labelledby="job_list___sub_heading_1516_1" data-parent="#job_list___sub_accordion_1516" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1516_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=944" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (944, 12), end pos: (944, 14)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -941,7 +941,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 if ( not method - or not intended_for + and not intended_for or not isinstance(secret, str) or not isinstance(key, str) ):</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) assert resp.status_code == 201 #Missing key resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing secret resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing recipient &gt; resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "id": 1}) ..\test\test_api.py:388: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ server.py:1044: in create_watermark intended_slug = secure_filename(intended_for) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filename = None def secure_filename(filename: str) -&gt; str: r"""Pass it a filename and it will return a secure version of it. This filename can then safely be stored on a regular file system and passed to :func:`os.path.join`. The filename returned is an ASCII only string for maximum portability. On windows systems the function also makes sure that the file is not named after one of the special device files. &gt;&gt;&gt; secure_filename("My cool movie.mov") 'My_cool_movie.mov' &gt;&gt;&gt; secure_filename("../../../etc/passwd") 'etc_passwd' &gt;&gt;&gt; secure_filename('i contain cool \xfcml\xe4uts.txt') 'i_contain_cool_umlauts.txt' The function might return an empty filename. It's your responsibility to ensure that the filename is unique and that you abort or generate a random filename if the function returned an empty one. .. versionadded:: 0.5 :param filename: the filename to secure """ &gt; filename = unicodedata.normalize("NFKD", filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: normalize() argument 2 must be str, not None C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\utils.py:219: TypeError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: None. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'method': 'robust-xmp', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - TypeError: normaliz... 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1517"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1517_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1517_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1517_1"><button class="btn btn-outline-success"><span class="job_id">1517 : Job ID a6d3c82a17e54b03b3814950db9a6421</span></button></div></a><div aria-labelledby="job_list___sub_heading_1517_1" data-parent="#job_list___sub_accordion_1517" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1517_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=945" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (945, 12), end pos: (945, 14)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -942,7 +942,7 @@ if ( not method or not intended_for - or not isinstance(secret, str) + and not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) assert resp.status_code == 201 #Missing key resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing secret resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 500 == 400 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:386: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'method': 'robust-xmp', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: 'NoneType' object has no attribute 'strip' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 400 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1518"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1518_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1518_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1518_1"><button class="btn btn-outline-success"><span class="job_id">1518 : Job ID d08308e1412d47e3bf2bfd0eda3a2a5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1518_1" data-parent="#job_list___sub_accordion_1518" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1518_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=946" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (946, 12), end pos: (946, 14)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -943,7 +943,7 @@ not method or not intended_for or not isinstance(secret, str) - or not isinstance(key, str) + and not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) assert resp.status_code == 201 #Missing key resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 500 == 400 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:382: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method robust-xmp: 'NoneType' object has no attribute 'strip' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 400 1 failed, 41 passed, 23 warnings in 21.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1519"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1519_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1519_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1519_1"><button class="btn btn-outline-danger"><span class="job_id">1519 : Job ID 680383816a7f40768f8991f8d5c56b07</span></button></div></a><div aria-labelledby="job_list___sub_heading_1519_1" data-parent="#job_list___sub_accordion_1519" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1519_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 61), end pos: (1024, 63)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) and len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1520"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1520_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1520_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1520_1"><button class="btn btn-outline-danger"><span class="job_id">1520 : Job ID c6d9b3fb41764fe2b498e9c76407f7f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1520_1" data-parent="#job_list___sub_accordion_1520" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1520_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1043" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1043, 34), end pos: (1043, 36)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1040,7 +1040,7 @@ return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" - base_name = Path(row.name or file_path.name).stem + base_name = Path(row.name and file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1521"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1521_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1521_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1521_1"><button class="btn btn-outline-danger"><span class="job_id">1521 : Job ID a009144eb8f544a8b07eeb5f2fdaa968</span></button></div></a><div aria-labelledby="job_list___sub_heading_1521_1" data-parent="#job_list___sub_accordion_1521" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1521_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1084" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1084, 45), end pos: (1084, 47)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1081,7 +1081,7 @@ "intended_for": intended_for, "secret": secret, "method": method, - "position": position or "", + "position": position and "", "path": str(dest_path), }, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1522"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1522_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1522_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1522_1"><button class="btn btn-outline-danger"><span class="job_id">1522 : Job ID 89b5300b529f479c89a97e3e18975881</span></button></div></a><div aria-labelledby="job_list___sub_heading_1522_1" data-parent="#job_list___sub_accordion_1522" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1522_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1151" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1151, 16), end pos: (1151, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1148,7 +1148,7 @@ if not document_id: document_id = ( request.args.get("id") - or request.args.get("documentid") + and request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1523"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1523_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1523_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1523_1"><button class="btn btn-outline-success"><span class="job_id">1523 : Job ID f94523bd9ace4915bdec015af82b0d3a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1523_1" data-parent="#job_list___sub_accordion_1523" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1523_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1152" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1152, 16), end pos: (1152, 18)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1149,7 +1149,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + and (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1524"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1524_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1524_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1524_1"><button class="btn btn-outline-success"><span class="job_id">1524 : Job ID 0d3c519baa9c48a8b891033174940609</span></button></div></a><div aria-labelledby="job_list___sub_heading_1524_1" data-parent="#job_list___sub_accordion_1524" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1524_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1152" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1152, 71), end pos: (1152, 73)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1149,7 +1149,7 @@ document_id = ( request.args.get("id") or request.args.get("documentid") - or (request.is_json and (request.get_json(silent=True) or {}).get("id")) + or (request.is_json and (request.get_json(silent=True) and {}).get("id")) ) try: doc_id = document_id</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1525"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1525_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1525_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1525_1"><button class="btn btn-outline-success"><span class="job_id">1525 : Job ID 0505710b88a44246b8eae468f054cd1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1525_1" data-parent="#job_list___sub_accordion_1525" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1525_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1160" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1160, 48), end pos: (1160, 50)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1157,7 +1157,7 @@ app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 - payload = request.get_json(silent=True) or {} + payload = request.get_json(silent=True) and {} # allow a couple of aliases for convenience method = payload.get("method") position = payload.get("position") or None</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 41 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1178 Missing required fields for watermarking: {} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1526"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1526_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1526_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1526_1"><button class="btn btn-outline-success"><span class="job_id">1526 : Job ID 633a345b32fa4f3cacca6406e4e58ec7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1526_1" data-parent="#job_list___sub_accordion_1526" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1526_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1163" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1163, 43), end pos: (1163, 45)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1160,7 +1160,7 @@ payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") - position = payload.get("position") or None + position = payload.get("position") and None key = payload.get("key") # validate input</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) &gt; assert isinstance(data.get("position"), str) E AssertionError: assert False E + where False = isinstance(None, str) E + where None = &lt;built-in method get of dict object at 0x0000014E112A4740&gt;('position') E + where &lt;built-in method get of dict object at 0x0000014E112A4740&gt; = {'documentid': 2, 'method': 'overlay-watermark', 'position': None, 'secret': 'None'}.get ..\test\test_api.py:421: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 1 failed, 41 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1527"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1527_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1527_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1527_1"><button class="btn btn-outline-danger"><span class="job_id">1527 : Job ID 37e7ac8259aa4b5db1aee56a215057bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1527_1" data-parent="#job_list___sub_accordion_1527" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1527_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 27), end pos: (1172, 29)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 0 and doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1528"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1528_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1528_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1528_1"><button class="btn btn-outline-success"><span class="job_id">1528 : Job ID 8e06c1e529ba41b7a6566b4eea3ac55d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1528_1" data-parent="#job_list___sub_accordion_1528" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1528_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 22), end pos: (1177, 24)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if not method and not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135901927630Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135902867666Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1529"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1529_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1529_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1529_1"><button class="btn btn-outline-success"><span class="job_id">1529 : Job ID a68f27bf94c0446097fadbc190482628</span></button></div></a><div aria-labelledby="job_list___sub_heading_1529_1" data-parent="#job_list___sub_accordion_1529" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1529_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1177" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1177, 53), end pos: (1177, 55)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1174,7 +1174,7 @@ except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 - if not method or not isinstance(method, str) or not isinstance(key, str): + if not method or not isinstance(method, str) and not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T101501792275Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T101502668513Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1530"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1530_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1530_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1530_1"><button class="btn btn-outline-danger"><span class="job_id">1530 : Job ID abefd8346a1e4bc484ebb8dcdffe7d9c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1530_1" data-parent="#job_list___sub_accordion_1530" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1530_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=42" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (42, 11), end pos: (42, 20)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -39,7 +39,7 @@ from rmap_handler import RMAPHandler as _RMAPHandler # type: ignore RMAPHandler = _RMAPHandler - except Exception: # pragma: no cover - degrade gracefully if missing + except CosmicRayTestingException: # pragma: no cover - degrade gracefully if missing RMAPHandler = None # type: ignore </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1531"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1531_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1531_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1531_1"><button class="btn btn-outline-danger"><span class="job_id">1531 : Job ID 0d522ee3b6b0441b80f10a9c32cca4c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1531_1" data-parent="#job_list___sub_accordion_1531" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1531_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (77, 19), end pos: (77, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -74,7 +74,7 @@ if eng is None: try: eng = create_engine(db_url(), pool_pre_ping=True, future=True) - except Exception as e: + except CosmicRayTestingException as e: app.logger.critical("Failed to initialize database engine: %s", e) raise app.config["_ENGINE"] = eng</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1532"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1532_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1532_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1532_1"><button class="btn btn-outline-success"><span class="job_id">1532 : Job ID 73db5cd63da94d1aa4cb7c6102ebf801</span></button></div></a><div aria-labelledby="job_list___sub_heading_1532_1" data-parent="#job_list___sub_accordion_1532" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1532_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=87" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (87, 15), end pos: (87, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -84,7 +84,7 @@ if RMAPHandler is not None: try: RMAPHandler(app, str(app.config["STORAGE_DIR"]), get_engine) - except Exception as e: # pragma: no cover - defensive; don't fail app + except CosmicRayTestingException as e: # pragma: no cover - defensive; don't fail app app.logger.warning("RMAP initialization failed (continuing): %s", e) # --- Helpers ---</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132425721613Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132426624626Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1533"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1533_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1533_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1533_1"><button class="btn btn-outline-danger"><span class="job_id">1533 : Job ID e954dfd9dc874a159b0891d0764a0e14</span></button></div></a><div aria-labelledby="job_list___sub_heading_1533_1" data-parent="#job_list___sub_accordion_1533" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1533_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=112" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (112, 19), end pos: (112, 35)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -109,7 +109,7 @@ data = _serializer().loads( token, max_age=app.config["TOKEN_TTL_SECONDS"] ) - except SignatureExpired: + except CosmicRayTestingException: return _auth_error("Token expired") except BadSignature: return _auth_error("Invalid token")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1534"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1534_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1534_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1534_1"><button class="btn btn-outline-danger"><span class="job_id">1534 : Job ID 372f7772a1b64f91ba7240480877b5b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1534_1" data-parent="#job_list___sub_accordion_1534" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1534_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=114" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (114, 19), end pos: (114, 31)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -111,7 +111,7 @@ ) except SignatureExpired: return _auth_error("Token expired") - except BadSignature: + except CosmicRayTestingException: return _auth_error("Invalid token") g.user = { "id": int(data["uid"]),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1535"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1535_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1535_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1535_1"><button class="btn btn-outline-success"><span class="job_id">1535 : Job ID 1e8d152bd96b4e64b1d61bec6d5759da</span></button></div></a><div aria-labelledby="job_list___sub_heading_1535_1" data-parent="#job_list___sub_accordion_1535" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1535_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=146" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (146, 19), end pos: (146, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -143,7 +143,7 @@ cl = request.content_length if cl is not None: observe_request_size(request.method, route, cl) - except Exception as exc: # pragma: no cover - soft fail + except CosmicRayTestingException as exc: # pragma: no cover - soft fail app.logger.warning("Request size capture failed: %s", exc) except Exception as exc: # pragma: no cover - defensive app.logger.warning("before_request instrumentation failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233354722759Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233355593045Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1536"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1536_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1536_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1536_1"><button class="btn btn-outline-danger"><span class="job_id">1536 : Job ID 54921a75709343cfbfc3a15ba907044c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1536_1" data-parent="#job_list___sub_accordion_1536" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1536_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=148" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (148, 15), end pos: (148, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -145,7 +145,7 @@ observe_request_size(request.method, route, cl) except Exception as exc: # pragma: no cover - soft fail app.logger.warning("Request size capture failed: %s", exc) - except Exception as exc: # pragma: no cover - defensive + except CosmicRayTestingException as exc: # pragma: no cover - defensive app.logger.warning("before_request instrumentation failed: %s", exc) @app.after_request # type: ignore</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1537"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1537_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1537_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1537_1"><button class="btn btn-outline-success"><span class="job_id">1537 : Job ID ec9b7c804521487a90e03707d66a9146</span></button></div></a><div aria-labelledby="job_list___sub_heading_1537_1" data-parent="#job_list___sub_accordion_1537" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1537_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=159" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (159, 15), end pos: (159, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -156,7 +156,7 @@ dur = time.time() - start route = request.url_rule.rule if request.url_rule else request.path record_request(request.method, route, resp.status_code, dur) - except Exception as exc: # pragma: no cover - defensive + except CosmicRayTestingException as exc: # pragma: no cover - defensive app.logger.warning("after_request instrumentation failed: %s", exc) return resp </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193833481004Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193834385972Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1538"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1538_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1538_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1538_1"><button class="btn btn-outline-danger"><span class="job_id">1538 : Job ID a475957d60454ce5889d01e356e65caf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1538_1" data-parent="#job_list___sub_accordion_1538" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1538_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=179" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (179, 15), end pos: (179, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -176,7 +176,7 @@ with get_engine().connect() as conn: conn.execute(text("SELECT 1")) db_ok = True - except Exception: + except CosmicRayTestingException: db_ok = False return jsonify( {"message": "The server is up and running.", "db_connected": db_ok}</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1539"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1539_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1539_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1539_1"><button class="btn btn-outline-danger"><span class="job_id">1539 : Job ID 7a601f506f7e4496bd092d213abd3288</span></button></div></a><div aria-labelledby="job_list___sub_heading_1539_1" data-parent="#job_list___sub_accordion_1539" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1539_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=230" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (230, 15), end pos: (230, 29)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -227,7 +227,7 @@ {"id": uid}, ).one() observe_db_latency("create_user", time.time() - start_db) - except IntegrityError: + except CosmicRayTestingException: app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1540"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1540_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1540_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1540_1"><button class="btn btn-outline-danger"><span class="job_id">1540 : Job ID 4eace4251d97427eb90f420e905c1ae6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1540_1" data-parent="#job_list___sub_accordion_1540" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1540_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=235" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (235, 15), end pos: (235, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -232,7 +232,7 @@ "Attempt to create duplicate user: email=%s, login=%s", email, login ) return jsonify({"error": "email or login already exists"}), 409 - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Database error in create_user: %s", e) return jsonify({"error": "database error"}), 503 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1541"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1541_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1541_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1541_1"><button class="btn btn-outline-danger"><span class="job_id">1541 : Job ID 4d373cd45cd94f59916e84ea58f9de6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1541_1" data-parent="#job_list___sub_accordion_1541" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1541_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=279" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (279, 15), end pos: (279, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -276,7 +276,7 @@ inc_login_failure("invalid_credentials") return jsonify({"error": "invalid credentials"}), 401 - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") return jsonify({"error": "An error occurred"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1542"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1542_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1542_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1542_1"><button class="btn btn-outline-danger"><span class="job_id">1542 : Job ID 534e4e322b7b4c40a1d7a9f65113fc4d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1542_1" data-parent="#job_list___sub_accordion_1542" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1542_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=356" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (356, 15), end pos: (356, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -353,7 +353,7 @@ return jsonify({"error": "invalid path"}), 400 file.save(stored_path) - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("File save error: %s", e) return jsonify({"error": "failed to save file"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1543"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1543_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1543_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1543_1"><button class="btn btn-outline-danger"><span class="job_id">1543 : Job ID 127dc9769f8f4fb48e3e9426c494e6fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1543_1" data-parent="#job_list___sub_accordion_1543" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1543_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=391" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (391, 15), end pos: (391, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -388,7 +388,7 @@ ), {"id": did}, ).one() - except Exception: + except CosmicRayTestingException: stored_path.unlink(missing_ok=True) app.logger.error( "Database error inserting document path=%s user=%s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1544"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1544_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1544_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1544_1"><button class="btn btn-outline-danger"><span class="job_id">1544 : Job ID 645cc8b6bec24fbea9ba094524a0b00e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1544_1" data-parent="#job_list___sub_accordion_1544" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1544_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=431" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (431, 15), end pos: (431, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -428,7 +428,7 @@ ), {"uid": int(g.user["id"])}, ).all() - except Exception: + except CosmicRayTestingException: app.logger.error( "Database error in list_documents for user=%s", g.user["id"] )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1545"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1545_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1545_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1545_1"><button class="btn btn-outline-success"><span class="job_id">1545 : Job ID af883d92ebbb4625a25a06d47eb00697</span></button></div></a><div aria-labelledby="job_list___sub_heading_1545_1" data-parent="#job_list___sub_accordion_1545" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1545_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=465" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (465, 20), end pos: (465, 29)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -462,7 +462,7 @@ if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223358394246Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223359279235Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1546"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1546_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1546_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1546_1"><button class="btn btn-outline-success"><span class="job_id">1546 : Job ID 6883339385a84607b32f4098a3c949e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1546_1" data-parent="#job_list___sub_accordion_1546" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1546_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=465" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (465, 31), end pos: (465, 41)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -462,7 +462,7 @@ if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T101734331532Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T101735203549Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1547"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1547_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1547_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1547_1"><button class="btn btn-outline-danger"><span class="job_id">1547 : Job ID 2c6709f00a2e4901baf45294ec620f6c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1547_1" data-parent="#job_list___sub_accordion_1547" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1547_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=503" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (503, 15), end pos: (503, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -500,7 +500,7 @@ """), {"did": document_id, "uid": int(g.user["id"])}, ).all() - except Exception: + except CosmicRayTestingException: app.logger.error( f"Database error in list_versions: {document_id},{g.user['id']}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1548"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1548_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1548_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1548_1"><button class="btn btn-outline-danger"><span class="job_id">1548 : Job ID 3e3508fd3de84e818cd6e83f3463e96b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1548_1" data-parent="#job_list___sub_accordion_1548" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1548_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=547" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (547, 15), end pos: (547, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -544,7 +544,7 @@ ), {"uid": int(g.user["id"])}, ).all() - except ValueError: + except CosmicRayTestingException: app.logger.error("Invalid user ID in auth token") return jsonify({"error": "Authentication error"}), 401 except Exception:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1549"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1549_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1549_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1549_1"><button class="btn btn-outline-danger"><span class="job_id">1549 : Job ID fccc56893990497f97a33e922c25eae1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1549_1" data-parent="#job_list___sub_accordion_1549" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1549_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=550" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (550, 15), end pos: (550, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -547,7 +547,7 @@ except ValueError: app.logger.error("Invalid user ID in auth token") return jsonify({"error": "Authentication error"}), 401 - except Exception: + except CosmicRayTestingException: app.logger.error( "Database error in list_all_versions for user=%s", g.user["id"] )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1550"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1550_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1550_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1550_1"><button class="btn btn-outline-success"><span class="job_id">1550 : Job ID 5348966caa35494f8cb1a71e699ed764</span></button></div></a><div aria-labelledby="job_list___sub_heading_1550_1" data-parent="#job_list___sub_accordion_1550" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1550_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=579" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (579, 20), end pos: (579, 29)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -576,7 +576,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ document_id = None @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: &gt; document_id = int(document_id) ^^^^^^^^^^^^^^^^ E TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' server.py:578: TypeError During handling of the above exception, another exception occurred: client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters &gt; resp = client.get("/api/get-document") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = None @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) &gt; except (CosmicRayTestingException, ValueError): ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined server.py:579: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - NameError: name 'Cosmic... 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1551"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1551_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1551_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1551_1"><button class="btn btn-outline-success"><span class="job_id">1551 : Job ID 487f4724ec6c44858b024b8e210b24fe</span></button></div></a><div aria-labelledby="job_list___sub_heading_1551_1" data-parent="#job_list___sub_accordion_1551" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1551_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=579" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (579, 31), end pos: (579, 41)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -576,7 +576,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ document_id = None @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: &gt; document_id = int(document_id) ^^^^^^^^^^^^^^^^ E TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' server.py:578: TypeError During handling of the above exception, another exception occurred: client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters &gt; resp = client.get("/api/get-document") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = None @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None: document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) &gt; except (TypeError, CosmicRayTestingException): ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined server.py:579: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - NameError: name 'Cosmic... 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1552"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1552_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1552_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1552_1"><button class="btn btn-outline-danger"><span class="job_id">1552 : Job ID 5f445d514a884b0289e3175d51ab9711</span></button></div></a><div aria-labelledby="job_list___sub_heading_1552_1" data-parent="#job_list___sub_accordion_1552" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1552_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=599" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (599, 15), end pos: (599, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -596,7 +596,7 @@ ), {"id": document_id, "uid": int(g.user["id"])}, ).first() - except Exception: + except CosmicRayTestingException: app.logger.error( f"Database error in get_document: {document_id},{g.user['id']}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1553"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1553_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1553_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1553_1"><button class="btn btn-outline-danger"><span class="job_id">1553 : Job ID 4ca3a523a91b4cdbae00724259bdd5d6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1553_1" data-parent="#job_list___sub_accordion_1553" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1553_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=622" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (622, 15), end pos: (622, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -619,7 +619,7 @@ try: resolved = file_path.resolve() resolved.relative_to(storage_root) - except Exception: + except CosmicRayTestingException: # Path looks suspicious or outside storage app.logger.warning( "Rejected document path for id %s: %s", document_id, row.path</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1554"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1554_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1554_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1554_1"><button class="btn btn-outline-danger"><span class="job_id">1554 : Job ID 93e0409d541e49ec9262cfde332ab639</span></button></div></a><div aria-labelledby="job_list___sub_heading_1554_1" data-parent="#job_list___sub_accordion_1554" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1554_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=636" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (636, 15), end pos: (636, 22)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -633,7 +633,7 @@ # TOCTOU-safe open and validation try: f = open(resolved, "rb") - except OSError: + except CosmicRayTestingException: app.logger.error("File missing on disk for document id=%s", document_id) return jsonify({"error": "file missing on disk"}), 410 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1555"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1555_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1555_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1555_1"><button class="btn btn-outline-danger"><span class="job_id">1555 : Job ID 20639f8b80c74160817fa3946a9dd89c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1555_1" data-parent="#job_list___sub_accordion_1555" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1555_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=684" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (684, 15), end pos: (684, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -681,7 +681,7 @@ ) return resp - except Exception as e: + except CosmicRayTestingException as e: f.close() # Log error and return generic message app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1556"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1556_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1556_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1556_1"><button class="btn btn-outline-danger"><span class="job_id">1556 : Job ID a5d8b3840fe94ae38ce561a449fc029a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1556_1" data-parent="#job_list___sub_accordion_1556" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1556_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=713" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (713, 15), end pos: (713, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -710,7 +710,7 @@ ), {"link": link}, ).first() - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Database error in get_version: %s", e) inc_db_error("get_version") return jsonify({"error": "database error"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1557"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1557_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1557_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1557_1"><button class="btn btn-outline-danger"><span class="job_id">1557 : Job ID d97919a06d094af5981101d11a664376</span></button></div></a><div aria-labelledby="job_list___sub_heading_1557_1" data-parent="#job_list___sub_accordion_1557" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1557_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=724" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (724, 15), end pos: (724, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -721,7 +721,7 @@ try: resolved = _safe_resolve_under_storage(row.path, app.config["STORAGE_DIR"]) - except Exception as exc: + except CosmicRayTestingException as exc: app.logger.warning( "Rejected version path for link %s: %s (%s)", link, row.path, exc )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1558"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1558_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1558_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1558_1"><button class="btn btn-outline-danger"><span class="job_id">1558 : Job ID a41b137197bc42d98fb8e0d7c2f4e9ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1558_1" data-parent="#job_list___sub_accordion_1558" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1558_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=744" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (744, 15), end pos: (744, 22)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -741,7 +741,7 @@ return jsonify({"error": "document not available"}), 415 fh.seek(0) last_modified = os.fstat(fh.fileno()).st_mtime - except OSError: + except CosmicRayTestingException: app.logger.error("File missing on disk for version link=%s", link) return jsonify({"error": "file missing on disk"}), 410 except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1559"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1559_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1559_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1559_1"><button class="btn btn-outline-danger"><span class="job_id">1559 : Job ID d31feb6089dc46738296b067e1f9cc19</span></button></div></a><div aria-labelledby="job_list___sub_heading_1559_1" data-parent="#job_list___sub_accordion_1559" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1559_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=747" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (747, 15), end pos: (747, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -744,7 +744,7 @@ except OSError: app.logger.error("File missing on disk for version link=%s", link) return jsonify({"error": "file missing on disk"}), 410 - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Error inspecting version file for %s: %s", link, e) return jsonify({"error": "error serving file"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1560"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1560_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1560_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1560_1"><button class="btn btn-outline-danger"><span class="job_id">1560 : Job ID d65e6b592305420287a1cba9aad417e7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1560_1" data-parent="#job_list___sub_accordion_1560" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1560_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=766" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (766, 15), end pos: (766, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -763,7 +763,7 @@ max_age=0, last_modified=last_modified, ) - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Error serving version %s: %s", link, e) return jsonify({"error": "error serving file"}), 500 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1561"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1561_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1561_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1561_1"><button class="btn btn-outline-danger"><span class="job_id">1561 : Job ID 6ed44955fa264f36b69acbabc71aa062</span></button></div></a><div aria-labelledby="job_list___sub_heading_1561_1" data-parent="#job_list___sub_accordion_1561" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1561_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=794" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (794, 19), end pos: (794, 29)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -791,7 +791,7 @@ else: try: fp.relative_to(storage_root) - except ValueError: + except CosmicRayTestingException: raise RuntimeError( f"path {fp} escapes storage root {storage_root}" ) from None</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1562"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1562_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1562_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1562_1"><button class="btn btn-outline-danger"><span class="job_id">1562 : Job ID 2e99325efef945ee92756df9fa79c2fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1562_1" data-parent="#job_list___sub_accordion_1562" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1562_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=819" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (819, 16), end pos: (819, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -816,7 +816,7 @@ try: doc_id = int(document_id) - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1563"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1563_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1563_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1563_1"><button class="btn btn-outline-danger"><span class="job_id">1563 : Job ID 2873dfe51c5e4fddb8c9183215e2f821</span></button></div></a><div aria-labelledby="job_list___sub_heading_1563_1" data-parent="#job_list___sub_accordion_1563" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1563_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=819" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (819, 27), end pos: (819, 37)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -816,7 +816,7 @@ try: doc_id = int(document_id) - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1564"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1564_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1564_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1564_1"><button class="btn btn-outline-danger"><span class="job_id">1564 : Job ID 4026eba81a1e4f77ba9e9bc23c43812a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1564_1" data-parent="#job_list___sub_accordion_1564" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1564_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=843" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (843, 15), end pos: (843, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -840,7 +840,7 @@ ), {"id": doc_id, "owner": owner_id}, ).first() - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_select") return jsonify({"error": "database error during delete"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1565"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1565_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1565_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1565_1"><button class="btn btn-outline-success"><span class="job_id">1565 : Job ID 15999124796f4b3e8921e3b365060fc7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1565_1" data-parent="#job_list___sub_accordion_1565" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1565_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=866" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (866, 23), end pos: (866, 32)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -863,7 +863,7 @@ try: fp.unlink() file_deleted = True - except Exception as e: + except CosmicRayTestingException as e: delete_error = f"failed to delete file: {e}" app.logger.warning( "Failed to delete file %s for doc id=%s: %s", fp, row.id, e</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T184300295833Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T184301186733Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1566"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1566_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1566_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1566_1"><button class="btn btn-outline-danger"><span class="job_id">1566 : Job ID 0d0ba1c69a034b2b80dbb940acbd9ccd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1566_1" data-parent="#job_list___sub_accordion_1566" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1566_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=873" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (873, 15), end pos: (873, 27)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -870,7 +870,7 @@ ) else: file_missing = True - except RuntimeError as e: + except CosmicRayTestingException as e: # Path escapes storage root; refuse to touch the file delete_error = str(e) app.logger.error("Path safety check failed for doc id=%s: %s", row.id, e)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1567"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1567_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1567_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1567_1"><button class="btn btn-outline-danger"><span class="job_id">1567 : Job ID 6fddb65273a64fe5bcc0f5f68044d0ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_1567_1" data-parent="#job_list___sub_accordion_1567" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1567_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=889" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (889, 15), end pos: (889, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -886,7 +886,7 @@ text("DELETE FROM Documents WHERE id = :id AND ownerid = :owner"), {"id": doc_id, "owner": owner_id}, ) - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_delete") return jsonify({"error": "database error during delete"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1568"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1568_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1568_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1568_1"><button class="btn btn-outline-danger"><span class="job_id">1568 : Job ID 97d1ebccdb4e4458bbbcf31256e74ab1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1568_1" data-parent="#job_list___sub_accordion_1568" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1568_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=919" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (919, 16), end pos: (919, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -916,7 +916,7 @@ ) try: doc_id = document_id - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1569"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1569_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1569_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1569_1"><button class="btn btn-outline-danger"><span class="job_id">1569 : Job ID 1cb7a321353347d3a443e49d187f7279</span></button></div></a><div aria-labelledby="job_list___sub_heading_1569_1" data-parent="#job_list___sub_accordion_1569" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1569_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=919" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (919, 27), end pos: (919, 37)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -916,7 +916,7 @@ ) try: doc_id = document_id - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1570"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1570_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1570_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1570_1"><button class="btn btn-outline-danger"><span class="job_id">1570 : Job ID 6569b09f02c545c28eb0e659eb193dea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1570_1" data-parent="#job_list___sub_accordion_1570" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1570_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=939" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (939, 16), end pos: (939, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -936,7 +936,7 @@ doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if (</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1571"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1571_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1571_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1571_1"><button class="btn btn-outline-danger"><span class="job_id">1571 : Job ID df4b27d6d0b4400896d54fcbafc01630</span></button></div></a><div aria-labelledby="job_list___sub_heading_1571_1" data-parent="#job_list___sub_accordion_1571" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1571_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=939" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (939, 27), end pos: (939, 37)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -936,7 +936,7 @@ doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if (</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1572"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1572_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1572_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1572_1"><button class="btn btn-outline-danger"><span class="job_id">1572 : Job ID aab8262e2351472ca818403255d539ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1572_1" data-parent="#job_list___sub_accordion_1572" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1572_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=967" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (967, 15), end pos: (967, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -964,7 +964,7 @@ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() - except Exception as e: + except CosmicRayTestingException as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1573"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1573_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1573_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1573_1"><button class="btn btn-outline-danger"><span class="job_id">1573 : Job ID 7668238816ee47248a88f06c9ea638a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1573_1" data-parent="#job_list___sub_accordion_1573" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1573_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=985" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (985, 15), end pos: (985, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -982,7 +982,7 @@ file_path = file_path.resolve() try: file_path.relative_to(storage_root) - except ValueError: + except CosmicRayTestingException: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1574"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1574_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1574_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1574_1"><button class="btn btn-outline-success"><span class="job_id">1574 : Job ID cf26cd5fb1494140861a86fc5fc53666</span></button></div></a><div aria-labelledby="job_list___sub_heading_1574_1" data-parent="#job_list___sub_accordion_1574" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1574_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1005" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1005, 15), end pos: (1005, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1002,7 +1002,7 @@ doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 - except Exception as e: + except CosmicRayTestingException as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ method = 'watermarkmethod' def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if isinstance(method, WatermarkingMethod): return method try: &gt; return METHODS[method] ^^^^^^^^^^^^^^^ E KeyError: 'watermarkmethod' watermarking_utils.py:79: KeyError The above exception was the direct cause of the following exception: document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: &gt; applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) server.py:994: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:112: in is_watermarking_applicable m = get_method(method) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = 'watermarkmethod' def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if isinstance(method, WatermarkingMethod): return method try: return METHODS[method] except KeyError as exc: &gt; raise KeyError( f"Unknown watermarking method: {method!r}. Known: {sorted(METHODS)}" ) from exc E KeyError: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" watermarking_utils.py:81: KeyError During handling of the above exception, another exception occurred: client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method &gt; resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) ..\test\test_api.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 &gt; except CosmicRayTestingException as e: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined server.py:1005: NameError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - NameError: name 'Co... 1 failed, 41 passed, 23 warnings in 22.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1575"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1575_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1575_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1575_1"><button class="btn btn-outline-danger"><span class="job_id">1575 : Job ID d33b76a5f96443a2a6ca5d4db2c5137d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1575_1" data-parent="#job_list___sub_accordion_1575" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1575_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1032" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1032, 15), end pos: (1032, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1029,7 +1029,7 @@ method, ) return jsonify({"error": "watermarking produced no output"}), 500 - except Exception as e: + except CosmicRayTestingException as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1576"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1576_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1576_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1576_1"><button class="btn btn-outline-danger"><span class="job_id">1576 : Job ID 4c558385bcbc452b9ec551c8d8ccee55</span></button></div></a><div aria-labelledby="job_list___sub_heading_1576_1" data-parent="#job_list___sub_accordion_1576" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1576_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1055" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1055, 15), end pos: (1055, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1052,7 +1052,7 @@ try: with dest_path.open("wb") as f: f.write(wm_bytes) - except Exception as e: + except CosmicRayTestingException as e: app.logger.error( "Failed to write watermarked file %s for document %s: %s", dest_path,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1577"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1577_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1577_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1577_1"><button class="btn btn-outline-success"><span class="job_id">1577 : Job ID 8a5f3f9bef9c48b28a1937f6152f6ae5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1577_1" data-parent="#job_list___sub_accordion_1577" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1577_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1089" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1089, 15), end pos: (1089, 29)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 47</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1086,7 +1086,7 @@ }, ) vid = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) - except IntegrityError as ie: + except CosmicRayTestingException as ie: # This should be very rare due to SHA-256 usage, but handle it just in case try: dest_path.unlink(missing_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ self = &lt;sqlalchemy.engine.base.Connection object at 0x0000023365611400&gt; dialect = &lt;sqlalchemy.dialects.mysql.pymysql.MySQLDialect_pymysql object at 0x000002336A2371D0&gt; context = &lt;sqlalchemy.dialects.mysql.mysqldb.MySQLExecutionContext_mysqldb object at 0x000002336A1E6DE0&gt; statement = &lt;sqlalchemy.dialects.mysql.mysqldb.MySQLCompiler_mysqldb object at 0x000002336A2361B0&gt; parameters = [{'documentid': 1, 'intended_for': 'Mickey Mouse', 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'method': 'robust-xmp', ...}] def _exec_single_context( self, dialect: Dialect, context: ExecutionContext, statement: Union[str, Compiled], parameters: Optional[_AnyMultiExecuteParams], ) -&gt; CursorResult[Any]: """continue the _execute_context() method for a single DBAPI cursor.execute() or cursor.executemany() call. """ if dialect.bind_typing is BindTyping.SETINPUTSIZES: generic_setinputsizes = context._prepare_set_input_sizes() if generic_setinputsizes: try: dialect.do_set_input_sizes( context.cursor, generic_setinputsizes, context ) except BaseException as e: self._handle_dbapi_exception( e, str(statement), parameters, None, context ) cursor, str_statement, parameters = ( context.cursor, context.statement, context.parameters, ) effective_parameters: Optional[_AnyExecuteParams] if not context.executemany: effective_parameters = parameters[0] else: effective_parameters = parameters if self._has_events or self.engine._has_events: for fn in self.dispatch.before_cursor_execute: str_statement, effective_parameters = fn( self, cursor, str_statement, effective_parameters, context, context.executemany, ) if self._echo: self._log_info(str_statement) stats = context._get_cache_stats() if not self.engine.hide_parameters: self._log_info( "[%s] %r", stats, sql_util._repr_params( effective_parameters, batches=10, ismulti=context.executemany, ), ) else: self._log_info( "[%s] [SQL parameters hidden due to hide_parameters=True]", stats, ) evt_handled: bool = False try: if context.execute_style is ExecuteStyle.EXECUTEMANY: effective_parameters = cast( "_CoreMultiExecuteParams", effective_parameters ) if self.dialect._has_events: for fn in self.dialect.dispatch.do_executemany: if fn( cursor, str_statement, effective_parameters, context, ): evt_handled = True break if not evt_handled: self.dialect.do_executemany( cursor, str_statement, effective_parameters, context, ) elif not effective_parameters and context.no_parameters: if self.dialect._has_events: for fn in self.dialect.dispatch.do_execute_no_params: if fn(cursor, str_statement, context): evt_handled = True break if not evt_handled: self.dialect.do_execute_no_params( cursor, str_statement, context ) else: effective_parameters = cast( "_CoreSingleExecuteParams", effective_parameters ) if self.dialect._has_events: for fn in self.dialect.dispatch.do_execute: if fn( cursor, str_statement, effective_parameters, context, ): evt_handled = True break if not evt_handled: &gt; self.dialect.do_execute( cursor, str_statement, effective_parameters, context ) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1967: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py:951: in do_execute cursor.execute(statement, parameters) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\cursors.py:153: in execute result = self._query(query) ^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\cursors.py:322: in _query conn.query(q) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:575: in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:826: in _read_query_result result.read() C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:1203: in read first_packet = self.connection._read_packet() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:782: in _read_packet packet.raise_for_error() C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\protocol.py:219: in raise_for_error err.raise_mysql_exception(self._data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = b"\xff&amp;\x04#23000Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'" def raise_mysql_exception(data): errno = struct.unpack("&lt;h", data[1:3])[0] # https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_err_packet.html # Error packet has optional sqlstate that is 5 bytes and starts with '#'. if data[3] == 0x23: # '#' # sqlstate = data[4:9].decode() # TODO: Append (sqlstate) in the error message. This will be come in next minor release. errval = data[9:].decode("utf-8", "replace") else: errval = data[3:].decode("utf-8", "replace") errorclass = error_map.get(errno) if errorclass is None: errorclass = InternalError if errno &lt; 1000 else OperationalError &gt; raise errorclass(errno, errval) E pymysql.err.IntegrityError: (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\err.py:150: IntegrityError The above exception was the direct cause of the following exception: document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" dest_path = dest_dir / candidate # write bytes try: with dest_path.open("wb") as f: f.write(wm_bytes) except Exception as e: app.logger.error( "Failed to write watermarked file %s for document %s: %s", dest_path, doc_id, e, ) return jsonify({"error": "failed to write watermarked file"}), 500 # link token = sha256(watermarked_file_name) - using stronger hash link_token = hashlib.sha256(candidate.encode("utf-8")).hexdigest() try: with get_engine().begin() as conn: &gt; conn.execute( text( """ INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (:documentid, :link, :intended_for, :secret, :method, :position, :path) """ ), { "documentid": doc_id, "link": link_token, "intended_for": intended_for, "secret": secret, "method": method, "position": position or "", "path": str(dest_path), }, ) server.py:1069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1419: in execute return meth( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\sql\elements.py:526: in _execute_on_connection return connection._execute_clauseelement( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1641: in _execute_clauseelement ret = self._execute_context( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1846: in _execute_context return self._exec_single_context( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1986: in _exec_single_context self._handle_dbapi_exception( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:2355: in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:1967: in _exec_single_context self.dialect.do_execute( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py:951: in do_execute cursor.execute(statement, parameters) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\cursors.py:153: in execute result = self._query(query) ^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\cursors.py:322: in _query conn.query(q) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:575: in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:826: in _read_query_result result.read() C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:1203: in read first_packet = self.connection._read_packet() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\connections.py:782: in _read_packet packet.raise_for_error() C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\protocol.py:219: in raise_for_error err.raise_mysql_exception(self._data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = b"\xff&amp;\x04#23000Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'" def raise_mysql_exception(data): errno = struct.unpack("&lt;h", data[1:3])[0] # https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_err_packet.html # Error packet has optional sqlstate that is 5 bytes and starts with '#'. if data[3] == 0x23: # '#' # sqlstate = data[4:9].decode() # TODO: Append (sqlstate) in the error message. This will be come in next minor release. errval = data[9:].decode("utf-8", "replace") else: errval = data[3:].decode("utf-8", "replace") errorclass = error_map.get(errno) if errorclass is None: errorclass = InternalError if errno &lt; 1000 else OperationalError &gt; raise errorclass(errno, errval) E sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") E [SQL: E INSERT INTO Versions (documentid, link, intended_for, E secret, method, position, path) E VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, E %(method)s, %(position)s, %(path)s) E ] E [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] E (Background on this error at: https://sqlalche.me/e/20/gkpj) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymysql\err.py:150: IntegrityError During handling of the above exception, another exception occurred: client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) &gt; resp = client.post("/api/create-watermark", json=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:103: in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ document_id = 1 @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id: document_id = ( request.args.get("id") or request.args.get("documentid") or (request.is_json and (request.get_json(silent=True) or {}).get("id")) ) try: doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience method = payload.get("method") intended_for = payload.get("intended_for") position = payload.get("position") or None secret = payload.get("secret") key = payload.get("key") # validate input try: if doc_id is None: app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if ( not method or not intended_for or not isinstance(secret, str) or not isinstance(key, str) ): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} ), 400 # lookup the document; enforce ownership try: with get_engine().connect() as conn: row = conn.execute( text( """ SELECT id, name, path FROM Documents WHERE id = :id AND ownerid = :owner LIMIT 1 """ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) return jsonify({"error": "database error"}), 503 if not row: app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) return jsonify({"error": "document not found"}), 404 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve() file_path = Path(row.path) if not file_path.is_absolute(): file_path = storage_root / file_path file_path = file_path.resolve() try: file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410 # check watermark applicability try: applicable = WMUtils.is_watermarking_applicable( method=method, pdf=str(file_path), position=position ) if applicable is False: inc_watermark_failed(method, "applicability") app.logger.info( "Watermarking method %s not applicable for document %s", method, doc_id, ) return jsonify({"error": "watermarking method not applicable"}), 400 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) return jsonify({"error": "watermark applicability check failed"}), 400 # apply watermark \u2192 bytes try: _wm_start = time.time() wm_bytes: bytes = WMUtils.apply_watermark( pdf=str(file_path), secret=secret, key=key, method=method, intended_for=intended_for, position=position, ) observe_watermark_duration(method, time.time() - _wm_start) if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s", doc_id, method, ) return jsonify({"error": "watermarking produced no output"}), 500 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error( "Watermarking failed for document %s using method %s: %s", doc_id, method, e, ) return jsonify({"error": "watermarking failed"}), 500 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem intended_slug = secure_filename(intended_for) dest_dir = file_path.parent / "watermarks" dest_dir.mkdir(parents=True, exist_ok=True) candidate = f"{base_name}__{intended_slug}.pdf" dest_path = dest_dir / candidate # write bytes try: with dest_path.open("wb") as f: f.write(wm_bytes) except Exception as e: app.logger.error( "Failed to write watermarked file %s for document %s: %s", dest_path, doc_id, e, ) return jsonify({"error": "failed to write watermarked file"}), 500 # link token = sha256(watermarked_file_name) - using stronger hash link_token = hashlib.sha256(candidate.encode("utf-8")).hexdigest() try: with get_engine().begin() as conn: conn.execute( text( """ INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (:documentid, :link, :intended_for, :secret, :method, :position, :path) """ ), { "documentid": doc_id, "link": link_token, "intended_for": intended_for, "secret": secret, "method": method, "position": position or "", "path": str(dest_path), }, ) vid = int(conn.execute(text("SELECT LAST_INSERT_ID()")).scalar()) &gt; except CosmicRayTestingException as ie: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined server.py:1089: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - NameError: name 'Co... 1 failed, 41 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1578"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1578_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1578_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1578_1"><button class="btn btn-outline-danger"><span class="job_id">1578 : Job ID e27e1bef9e2b43b2b1847ebdb7957374</span></button></div></a><div aria-labelledby="job_list___sub_heading_1578_1" data-parent="#job_list___sub_accordion_1578" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1578_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1093" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1093, 19), end pos: (1093, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 48</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1090,7 +1090,7 @@ # This should be very rare due to SHA-256 usage, but handle it just in case try: dest_path.unlink(missing_ok=True) - except Exception as cleanup_error: + except CosmicRayTestingException as cleanup_error: app.logger.warning( f"Failed to cleanup file {dest_path}: {cleanup_error}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1579"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1579_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1579_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1579_1"><button class="btn btn-outline-danger"><span class="job_id">1579 : Job ID d7cde12ce259485e90b4af62d7958ba9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1579_1" data-parent="#job_list___sub_accordion_1579" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1579_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1102" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1102, 15), end pos: (1102, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 49</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1099,7 +1099,7 @@ ) inc_db_error("insert_version") return jsonify({"error": "database error during version insert"}), 503 - except Exception: + except CosmicRayTestingException: try: dest_path.unlink(missing_ok=True) except Exception as cleanup_error:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1580"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1580_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1580_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1580_1"><button class="btn btn-outline-danger"><span class="job_id">1580 : Job ID 2bc9e06c16b2478a991828afbdac9a15</span></button></div></a><div aria-labelledby="job_list___sub_heading_1580_1" data-parent="#job_list___sub_accordion_1580" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1580_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1105" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1105, 19), end pos: (1105, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 50</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1102,7 +1102,7 @@ except Exception: try: dest_path.unlink(missing_ok=True) - except Exception as cleanup_error: + except CosmicRayTestingException as cleanup_error: app.logger.warning( f"Failed to cleanup file {dest_path}: {cleanup_error}" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1581"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1581_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1581_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1581_1"><button class="btn btn-outline-danger"><span class="job_id">1581 : Job ID 006bf153a3db4d03b23539906541bc52</span></button></div></a><div aria-labelledby="job_list___sub_heading_1581_1" data-parent="#job_list___sub_accordion_1581" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1581_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1156, 16), end pos: (1156, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 51</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1153,7 +1153,7 @@ ) try: doc_id = document_id - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1582"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1582_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1582_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1582_1"><button class="btn btn-outline-danger"><span class="job_id">1582 : Job ID ef39bf5067e040dba6cf40cb2509ba30</span></button></div></a><div aria-labelledby="job_list___sub_heading_1582_1" data-parent="#job_list___sub_accordion_1582" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1582_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1156" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1156, 27), end pos: (1156, 37)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 52</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1153,7 +1153,7 @@ ) try: doc_id = document_id - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id in query: %s", document_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1583"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1583_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1583_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1583_1"><button class="btn btn-outline-danger"><span class="job_id">1583 : Job ID 686199209f084f879c6b8ee013249175</span></button></div></a><div aria-labelledby="job_list___sub_heading_1583_1" data-parent="#job_list___sub_accordion_1583" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1583_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1174" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1174, 16), end pos: (1174, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 53</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1171,7 +1171,7 @@ doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 - except (TypeError, ValueError): + except (CosmicRayTestingException, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if not method or not isinstance(method, str) or not isinstance(key, str):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1584"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1584_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1584_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1584_1"><button class="btn btn-outline-success"><span class="job_id">1584 : Job ID 44fe1cef7c3c464d997cdb4a22815783</span></button></div></a><div aria-labelledby="job_list___sub_heading_1584_1" data-parent="#job_list___sub_accordion_1584" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1584_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1174" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1174, 27), end pos: (1174, 37)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 54</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1171,7 +1171,7 @@ doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 - except (TypeError, ValueError): + except (TypeError, CosmicRayTestingException): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400 if not method or not isinstance(method, str) or not isinstance(key, str):</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133957473413Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133958350057Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1585"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1585_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1585_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1585_1"><button class="btn btn-outline-danger"><span class="job_id">1585 : Job ID a35750220be54fe686b84cb7fe21b1af</span></button></div></a><div aria-labelledby="job_list___sub_heading_1585_1" data-parent="#job_list___sub_accordion_1585" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1585_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1195" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1195, 15), end pos: (1195, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 55</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1192,7 +1192,7 @@ ), {"id": doc_id, "owner": int(g.user["id"])}, ).first() - except Exception as e: + except CosmicRayTestingException as e: app.logger.error( "Database error fetching document %s for watermark read: %s", doc_id, e )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1586"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1586_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1586_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1586_1"><button class="btn btn-outline-danger"><span class="job_id">1586 : Job ID 113b0d839953485493f40bb558dc1f90</span></button></div></a><div aria-labelledby="job_list___sub_heading_1586_1" data-parent="#job_list___sub_accordion_1586" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1586_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1215" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1215, 15), end pos: (1215, 25)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 56</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1212,7 +1212,7 @@ file_path = file_path.resolve() try: file_path.relative_to(storage_root) - except ValueError: + except CosmicRayTestingException: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) return jsonify({"error": "document path invalid"}), 500 if not file_path.exists():</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1587"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1587_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1587_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1587_1"><button class="btn btn-outline-success"><span class="job_id">1587 : Job ID 3df36d28e27643d5871c16d35ca9365f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1587_1" data-parent="#job_list___sub_accordion_1587" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1587_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1225" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1225, 15), end pos: (1225, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 57</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1222,7 +1222,7 @@ secret = None try: secret = WMUtils.read_watermark(method=method, pdf=str(file_path), key=key) - except Exception as e: + except CosmicRayTestingException as e: app.logger.error( "Error when attempting to read watermark for document %s: %s", doc_id, e )</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123507545257Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T123508525133Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1588"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1588_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1588_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1588_1"><button class="btn btn-outline-danger"><span class="job_id">1588 : Job ID 687b2cda1cd644599953c95525fd0583</span></button></div></a><div aria-labelledby="job_list___sub_heading_1588_1" data-parent="#job_list___sub_accordion_1588" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1588_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 14), end pos: (34, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = ( 3**63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1589"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1589_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1589_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1589_1"><button class="btn btn-outline-success"><span class="job_id">1589 : Job ID f5b7e832c4c04f6a9ab9b9245d85ba0b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1589_1" data-parent="#job_list___sub_accordion_1589" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1589_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 14), end pos: (34, 15)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = ( 1**63) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.F.FFF.............................. [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:824 Non-positive document id for deletion: 2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 400 == 200 5 failed, 37 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1590"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1590_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1590_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1590_1"><button class="btn btn-outline-danger"><span class="job_id">1590 : Job ID 7cde987885a34095a58a170d5f5e9ef3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1590_1" data-parent="#job_list___sub_accordion_1590" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1590_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 17), end pos: (34, 19)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2** 64) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1591"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1591_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1591_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1591_1"><button class="btn btn-outline-danger"><span class="job_id">1591 : Job ID 6f1dee0506c541c0a001a99cd05db5db</span></button></div></a><div aria-labelledby="job_list___sub_heading_1591_1" data-parent="#job_list___sub_accordion_1591" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1591_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 17), end pos: (34, 19)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2** 62) - 1 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1592"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1592_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1592_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1592_1"><button class="btn btn-outline-danger"><span class="job_id">1592 : Job ID 989018d738674d80a8f241128813b0c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1592_1" data-parent="#job_list___sub_accordion_1592" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1592_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 23), end pos: (34, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) - 2 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1593"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1593_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1593_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1593_1"><button class="btn btn-outline-danger"><span class="job_id">1593 : Job ID 2e6ef115267d497a8b92ac38f29d8bb1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1593_1" data-parent="#job_list___sub_accordion_1593" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1593_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (34, 23), end pos: (34, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -31,7 +31,7 @@ render_prometheus, ) -MAX_DB_INT = (2**63) - 1 +MAX_DB_INT = (2**63) - 0 RMAPHandler = None # default if not os.environ.get("TATOU_TEST_DISABLE_RMAP"):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1594"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1594_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1594_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1594_1"><button class="btn btn-outline-danger"><span class="job_id">1594 : Job ID 6ebfc9890a2c401dab6943f43b7acb84</span></button></div></a><div aria-labelledby="job_list___sub_heading_1594_1" data-parent="#job_list___sub_accordion_1594" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1594_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=94" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (94, 42), end pos: (94, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -91,7 +91,7 @@ def _serializer(): return URLSafeTimedSerializer(app.config["SECRET_KEY"], salt="ljkdsad123123kjd") - def _auth_error(msg: str, code: int = 401): + def _auth_error(msg: str, code: int = 402): app.logger.warning("Auth error (%s): %s", code, msg) return jsonify({"error": msg}), code </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1595"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1595_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1595_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1595_1"><button class="btn btn-outline-success"><span class="job_id">1595 : Job ID 116342453be34e0eb4676ad8618545d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1595_1" data-parent="#job_list___sub_accordion_1595" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1595_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=94" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (94, 42), end pos: (94, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -91,7 +91,7 @@ def _serializer(): return URLSafeTimedSerializer(app.config["SECRET_KEY"], salt="ljkdsad123123kjd") - def _auth_error(msg: str, code: int = 401): + def _auth_error(msg: str, code: int = 400): app.logger.warning("Auth error (%s): %s", code, msg) return jsonify({"error": msg}), code </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182010066186Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T182010937404Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1596"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1596_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1596_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1596_1"><button class="btn btn-outline-success"><span class="job_id">1596 : Job ID 86b95448d2334acfb9c964a426dad945</span></button></div></a><div aria-labelledby="job_list___sub_heading_1596_1" data-parent="#job_list___sub_accordion_1596" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1596_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (102, 32), end pos: (102, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -99,7 +99,7 @@ @wraps(f) def wrapper(*args, **kwargs): if app.config['TESTING']: - g.user = {"id": 1, "login": "username", "email": "user@email.se"} + g.user = {"id": 2, "login": "username", "email": "user@email.se"} return f(*args, **kwargs) auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "):</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T191601087429Z__input.pdf user=2 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T191602123059Z__watermarked.pdf user=2 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1597"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1597_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1597_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1597_1"><button class="btn btn-outline-success"><span class="job_id">1597 : Job ID 74edec684483465d8639d0648f60528d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1597_1" data-parent="#job_list___sub_accordion_1597" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1597_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (102, 32), end pos: (102, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -99,7 +99,7 @@ @wraps(f) def wrapper(*args, **kwargs): if app.config['TESTING']: - g.user = {"id": 1, "login": "username", "email": "user@email.se"} + g.user = {"id": 0, "login": "username", "email": "user@email.se"} return f(*args, **kwargs) auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "):</pre></div><div class="alert alert-secondary"><pre class="diff">...F.FFF.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134821799431Z__input.pdf user=0 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 35 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:530 Missing user info in auth token ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134822833522Z__watermarked.pdf user=0 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 401 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 7 failed, 35 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1598"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1598_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1598_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1598_1"><button class="btn btn-outline-success"><span class="job_id">1598 : Job ID 5ade6bd1299b4eaeb2f7488dc72dda12</span></button></div></a><div aria-labelledby="job_list___sub_heading_1598_1" data-parent="#job_list___sub_accordion_1598" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1598_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (107, 36), end pos: (107, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -104,7 +104,7 @@ auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") - token = auth.split(" ", 1)[1].strip() + token = auth.split(" ", 2)[1].strip() try: data = _serializer().loads( token, max_age=app.config["TOKEN_TTL_SECONDS"]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181203089438Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181203958887Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1599"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1599_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1599_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1599_1"><button class="btn btn-outline-success"><span class="job_id">1599 : Job ID fd92b0441c3a4b3295f48ff039da8379</span></button></div></a><div aria-labelledby="job_list___sub_heading_1599_1" data-parent="#job_list___sub_accordion_1599" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1599_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (107, 36), end pos: (107, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -104,7 +104,7 @@ auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") - token = auth.split(" ", 1)[1].strip() + token = auth.split(" ", 0)[1].strip() try: data = _serializer().loads( token, max_age=app.config["TOKEN_TTL_SECONDS"]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T221931831441Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T221932665734Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1600"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1600_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1600_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1600_1"><button class="btn btn-outline-success"><span class="job_id">1600 : Job ID 99c665eee8ba40c982a27eca237f368b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1600_1" data-parent="#job_list___sub_accordion_1600" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1600_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (107, 39), end pos: (107, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -104,7 +104,7 @@ auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") - token = auth.split(" ", 1)[1].strip() + token = auth.split(" ", 1)[ 2].strip() try: data = _serializer().loads( token, max_age=app.config["TOKEN_TTL_SECONDS"]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104112479399Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104113327872Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1601"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1601_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1601_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1601_1"><button class="btn btn-outline-danger"><span class="job_id">1601 : Job ID 79c96f1e1231470d96d78b01e845437a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1601_1" data-parent="#job_list___sub_accordion_1601" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1601_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (107, 39), end pos: (107, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -104,7 +104,7 @@ auth = request.headers.get("Authorization", "") if not auth.startswith("Bearer "): return _auth_error("Missing or invalid Authorization header") - token = auth.split(" ", 1)[1].strip() + token = auth.split(" ", 1)[ 0].strip() try: data = _serializer().loads( token, max_age=app.config["TOKEN_TTL_SECONDS"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1602"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1602_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1602_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1602_1"><button class="btn btn-outline-danger"><span class="job_id">1602 : Job ID f84bffb42260458b923fe3529dbb4484</span></button></div></a><div aria-labelledby="job_list___sub_heading_1602_1" data-parent="#job_list___sub_accordion_1602" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1602_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 45), end pos: (130, 49)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read( 1025 * 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1603"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1603_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1603_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1603_1"><button class="btn btn-outline-danger"><span class="job_id">1603 : Job ID 931e9a33af1c4ccea2ed990747e50903</span></button></div></a><div aria-labelledby="job_list___sub_heading_1603_1" data-parent="#job_list___sub_accordion_1603" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1603_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 45), end pos: (130, 49)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read( 1023 * 1024), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1604"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1604_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1604_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1604_1"><button class="btn btn-outline-danger"><span class="job_id">1604 : Job ID e936ad74b5354f9996d1a7030cf8d553</span></button></div></a><div aria-labelledby="job_list___sub_heading_1604_1" data-parent="#job_list___sub_accordion_1604" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1604_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 52), end pos: (130, 56)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 * 1025), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1605"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1605_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1605_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1605_1"><button class="btn btn-outline-danger"><span class="job_id">1605 : Job ID abcb581cd81444f1bf7556c447558d43</span></button></div></a><div aria-labelledby="job_list___sub_heading_1605_1" data-parent="#job_list___sub_accordion_1605" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1605_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 52), end pos: (130, 56)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in iter(lambda: f.read(1024 * 1023), b""): h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1606"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1606_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1606_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1606_1"><button class="btn btn-outline-success"><span class="job_id">1606 : Job ID 2e495a0dec784b15a8720eee1ffeb16d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1606_1" data-parent="#job_list___sub_accordion_1606" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1606_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=183" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (183, 11), end pos: (183, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -180,7 +180,7 @@ db_ok = False return jsonify( {"message": "The server is up and running.", "db_connected": db_ok} - ), 200 + ), 201 # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]:</pre></div><div class="alert alert-secondary"><pre class="diff">F......................................... [100%] ================================== FAILURES =================================== _____________________________ test_healthz_route ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_healthz_route(client): """Test the health check endpoint.""" resp = client.get("/healthz") &gt; assert resp.status_code == 200 # nosec B101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:60: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_healthz_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1607"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1607_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1607_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1607_1"><button class="btn btn-outline-success"><span class="job_id">1607 : Job ID 6c80dee2c43b4de29196a5e6bd5c94ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_1607_1" data-parent="#job_list___sub_accordion_1607" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1607_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=183" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (183, 11), end pos: (183, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -180,7 +180,7 @@ db_ok = False return jsonify( {"message": "The server is up and running.", "db_connected": db_ok} - ), 200 + ), 199 # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]:</pre></div><div class="alert alert-secondary"><pre class="diff">F......................................... [100%] ================================== FAILURES =================================== _____________________________ test_healthz_route ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_healthz_route(client): """Test the health check endpoint.""" resp = client.get("/healthz") &gt; assert resp.status_code == 200 # nosec B101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 199 == 200 E + where 199 = &lt;WrapperTestResponse streamed [199 UNKNOWN]&gt;.status_code ..\test\test_api.py:60: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_healthz_route - assert 199 == 200 1 failed, 41 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1608"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1608_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1608_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1608_1"><button class="btn btn-outline-danger"><span class="job_id">1608 : Job ID 6bc99323926847419b043d1a17e52264</span></button></div></a><div aria-labelledby="job_list___sub_heading_1608_1" data-parent="#job_list___sub_accordion_1608" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1608_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 24), end pos: (188, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 321 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1609"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1609_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1609_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1609_1"><button class="btn btn-outline-danger"><span class="job_id">1609 : Job ID a6c73778506f45c697128541c2db3540</span></button></div></a><div aria-labelledby="job_list___sub_heading_1609_1" data-parent="#job_list___sub_accordion_1609" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1609_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 24), end pos: (188, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 319 or len(login) &gt; 64: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1610"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1610_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1610_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1610_1"><button class="btn btn-outline-success"><span class="job_id">1610 : Job ID 6ed74793d5c241f9a24b997a87d7e947</span></button></div></a><div aria-labelledby="job_list___sub_heading_1610_1" data-parent="#job_list___sub_accordion_1610" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1610_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 44), end pos: (188, 46)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) &gt; 65: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T174815548727Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T174816445125Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1611"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1611_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1611_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1611_1"><button class="btn btn-outline-danger"><span class="job_id">1611 : Job ID d59579a7b8f54a32b0c07d84728230cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1611_1" data-parent="#job_list___sub_accordion_1611" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1611_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (188, 44), end pos: (188, 46)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -185,7 +185,7 @@ # Extra backend validation for user input def validate_user_input(email: str, login: str) -&gt; tuple[bool, str]: """Validate user input before database operations""" - if len(email) &gt; 320 or len(login) &gt; 64: + if len(email) &gt; 320 or len(login) &gt; 63: return False, "Email or login too long" if not re.match(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", email): return False, "Invalid email format"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1612"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1612_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1612_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1612_1"><button class="btn btn-outline-success"><span class="job_id">1612 : Job ID 86008991e8bd4c489e5695be1183cf7b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1612_1" data-parent="#job_list___sub_accordion_1612" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1612_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=206" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (206, 82), end pos: (206, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -203,7 +203,7 @@ start_db = time.time() if not email or not login or not password: app.logger.warning("Missing fields in user creation: %s", payload) - return jsonify({"error": "email, login, and password are required"}), 400 + return jsonify({"error": "email, login, and password are required"}), 401 hpw = generate_password_hash(password) </pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:93: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1613"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1613_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1613_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1613_1"><button class="btn btn-outline-success"><span class="job_id">1613 : Job ID ba3917ba19894f7993d6ef4d10283d37</span></button></div></a><div aria-labelledby="job_list___sub_heading_1613_1" data-parent="#job_list___sub_accordion_1613" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1613_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=206" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (206, 82), end pos: (206, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -203,7 +203,7 @@ start_db = time.time() if not email or not login or not password: app.logger.warning("Missing fields in user creation: %s", payload) - return jsonify({"error": "email, login, and password are required"}), 400 + return jsonify({"error": "email, login, and password are required"}), 399 hpw = generate_password_hash(password) </pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:93: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1614"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1614_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1614_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1614_1"><button class="btn btn-outline-success"><span class="job_id">1614 : Job ID aa46c2f92ac54d33a13cc350321c96eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1614_1" data-parent="#job_list___sub_accordion_1614" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1614_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (214, 54), end pos: (214, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -211,7 +211,7 @@ is_valid, error_msg = validate_user_input(email, login) if not is_valid: app.logger.warning("User input validation failed: %s", error_msg) - return jsonify({"error": error_msg}), 400 + return jsonify({"error": error_msg}), 401 with get_engine().begin() as conn: res = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) assert resp.status_code == 400 # Missing login resp = client.post("/api/create-user", json={"email": "user@email.se", "password": "password"}, ) assert resp.status_code == 400 # Missing password resp = client.post( "/api/create-user", json={"email": "user@email.se", "login": "username"} ) assert resp.status_code == 400 # Malformed email resp = client.post("/api/create-user",json={ "email": "malformedemail", "login": "username", "password": "password", }, # pragma: allowlist secret ) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:114: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username'} WARNING server:server.py:213 User input validation failed: Invalid email format ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1615"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1615_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1615_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1615_1"><button class="btn btn-outline-success"><span class="job_id">1615 : Job ID bfcbb81e14ea47c18f80ea08a25b1132</span></button></div></a><div aria-labelledby="job_list___sub_heading_1615_1" data-parent="#job_list___sub_accordion_1615" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1615_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (214, 54), end pos: (214, 57)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -211,7 +211,7 @@ is_valid, error_msg = validate_user_input(email, login) if not is_valid: app.logger.warning("User input validation failed: %s", error_msg) - return jsonify({"error": error_msg}), 400 + return jsonify({"error": error_msg}), 399 with get_engine().begin() as conn: res = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 201 # Endpoint should exist assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) assert isinstance(resp_data.get("login"), str) assert isinstance(resp_data.get("email"), str) #check values are what we submitted assert resp_data.get("login") == parameters["login"] assert resp_data.get("email") == parameters["email"] #Test with missing parameters # Missing email resp = client.post("/api/create-user",json={ "login": "username", "password": "password", }, # pragma: allowlist secret ) assert resp.status_code == 400 # Missing login resp = client.post("/api/create-user", json={"email": "user@email.se", "password": "password"}, ) assert resp.status_code == 400 # Missing password resp = client.post( "/api/create-user", json={"email": "user@email.se", "login": "username"} ) assert resp.status_code == 400 # Malformed email resp = client.post("/api/create-user",json={ "email": "malformedemail", "login": "username", "password": "password", }, # pragma: allowlist secret ) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:114: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:205 Missing fields in user creation: {'login': 'username', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'password': 'password'} WARNING server:server.py:205 Missing fields in user creation: {'email': 'user@email.se', 'login': 'username'} WARNING server:server.py:213 User input validation failed: Invalid email format ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1616"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1616_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1616_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1616_1"><button class="btn btn-outline-danger"><span class="job_id">1616 : Job ID d4350a8473774500997c4051f4108bcd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1616_1" data-parent="#job_list___sub_accordion_1616" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1616_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=234" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (234, 72), end pos: (234, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -231,7 +231,7 @@ app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login ) - return jsonify({"error": "email or login already exists"}), 409 + return jsonify({"error": "email or login already exists"}), 410 except Exception as e: app.logger.error("Database error in create_user: %s", e) return jsonify({"error": "database error"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1617"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1617_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1617_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1617_1"><button class="btn btn-outline-danger"><span class="job_id">1617 : Job ID db22d770d1e74d9ca27502ca179af696</span></button></div></a><div aria-labelledby="job_list___sub_heading_1617_1" data-parent="#job_list___sub_accordion_1617" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1617_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=234" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (234, 72), end pos: (234, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -231,7 +231,7 @@ app.logger.warning( "Attempt to create duplicate user: email=%s, login=%s", email, login ) - return jsonify({"error": "email or login already exists"}), 409 + return jsonify({"error": "email or login already exists"}), 408 except Exception as e: app.logger.error("Database error in create_user: %s", e) return jsonify({"error": "database error"}), 503</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1618"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1618_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1618_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1618_1"><button class="btn btn-outline-danger"><span class="job_id">1618 : Job ID ea668d8f31d745feb98fb88e2f7e7316</span></button></div></a><div aria-labelledby="job_list___sub_heading_1618_1" data-parent="#job_list___sub_accordion_1618" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1618_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (237, 57), end pos: (237, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -234,7 +234,7 @@ return jsonify({"error": "email or login already exists"}), 409 except Exception as e: app.logger.error("Database error in create_user: %s", e) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 504 return jsonify({"id": row.id, "email": row.email, "login": row.login}), 201 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1619"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1619_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1619_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1619_1"><button class="btn btn-outline-danger"><span class="job_id">1619 : Job ID bf9397e060d64a0d900c8d406c5a2e9c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1619_1" data-parent="#job_list___sub_accordion_1619" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1619_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (237, 57), end pos: (237, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -234,7 +234,7 @@ return jsonify({"error": "email or login already exists"}), 409 except Exception as e: app.logger.error("Database error in create_user: %s", e) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 502 return jsonify({"id": row.id, "email": row.email, "login": row.login}), 201 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1620"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1620_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1620_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1620_1"><button class="btn btn-outline-success"><span class="job_id">1620 : Job ID 61c353c4324d427c979093070f5a2d5d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1620_1" data-parent="#job_list___sub_accordion_1620" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1620_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=239" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (239, 80), end pos: (239, 83)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -236,7 +236,7 @@ app.logger.error("Database error in create_user: %s", e) return jsonify({"error": "database error"}), 503 - return jsonify({"id": row.id, "email": row.email, "login": row.login}), 201 + return jsonify({"id": row.id, "email": row.email, "login": row.login}), 202 # POST /api/login {login, password} @app.post("/api/login")</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 202 == 201 E + where 202 = &lt;WrapperTestResponse 52 bytes [202 ACCEPTED]&gt;.status_code ..\test\test_api.py:76: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 202 == 201 1 failed, 41 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1621"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1621_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1621_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1621_1"><button class="btn btn-outline-success"><span class="job_id">1621 : Job ID f1bef769bbec499190a5eb59d0fc49d9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1621_1" data-parent="#job_list___sub_accordion_1621" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1621_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=239" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (239, 80), end pos: (239, 83)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -236,7 +236,7 @@ app.logger.error("Database error in create_user: %s", e) return jsonify({"error": "database error"}), 503 - return jsonify({"id": row.id, "email": row.email, "login": row.login}), 201 + return jsonify({"id": row.id, "email": row.email, "login": row.login}), 200 # POST /api/login {login, password} @app.post("/api/login")</pre></div><div class="alert alert-secondary"><pre class="diff">.F........................................ [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 200 == 201 E + where 200 = &lt;WrapperTestResponse 52 bytes [200 OK]&gt;.status_code ..\test\test_api.py:76: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 200 == 201 1 failed, 41 passed, 23 warnings in 21.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1622"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1622_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1622_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1622_1"><button class="btn btn-outline-success"><span class="job_id">1622 : Job ID 513371453c4f4f6680a4ab31fa488b56</span></button></div></a><div aria-labelledby="job_list___sub_heading_1622_1" data-parent="#job_list___sub_accordion_1622" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1622_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=250" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (250, 74), end pos: (250, 77)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -247,7 +247,7 @@ if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) - return jsonify({"error": "email and password are required"}), 400 + return jsonify({"error": "email and password are required"}), 401 start_db = time.time() try:</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:141: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1623"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1623_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1623_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1623_1"><button class="btn btn-outline-success"><span class="job_id">1623 : Job ID 6e462ddbe41b4887bc0c98e798191cc9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1623_1" data-parent="#job_list___sub_accordion_1623" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1623_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=250" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (250, 74), end pos: (250, 77)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -247,7 +247,7 @@ if not email or not password: app.logger.warning("Missing fields in login attempt: %s", payload) - return jsonify({"error": "email and password are required"}), 400 + return jsonify({"error": "email and password are required"}), 399 start_db = time.time() try:</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:141: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1624"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1624_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1624_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1624_1"><button class="btn btn-outline-success"><span class="job_id">1624 : Job ID 5d52be0004a24b24b2539c6fae8455f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1624_1" data-parent="#job_list___sub_accordion_1624" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1624_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (277, 70), end pos: (277, 73)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -274,7 +274,7 @@ email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") - return jsonify({"error": "invalid credentials"}), 401 + return jsonify({"error": "invalid credentials"}), 402 except Exception as e: app.logger.error("Database error in login: %s", e)</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) assert resp.status_code == 400 # Missing password resp = client.post("/api/login", json={"email": "user@email.se"}) assert resp.status_code == 400 # Both missing resp = client.post("/api/login", json={}) assert resp.status_code == 400 # Malformed email - counts as non existing resp = client.post("/api/login", json={"email": "malformedemail", "password": "password"}) &gt; assert resp.status_code == 401 E assert 402 == 401 E + where 402 = &lt;WrapperTestResponse streamed [402 PAYMENT REQUIRED]&gt;.status_code ..\test\test_api.py:150: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se'} WARNING server:server.py:249 Missing fields in login attempt: {} WARNING server:server.py:272 Failed login attempt for email: malformedemail ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 402 == 401 1 failed, 41 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1625"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1625_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1625_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1625_1"><button class="btn btn-outline-success"><span class="job_id">1625 : Job ID 6c7249863be946bd90e4c33e766fdf8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1625_1" data-parent="#job_list___sub_accordion_1625" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1625_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (277, 70), end pos: (277, 73)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -274,7 +274,7 @@ email if email else "&lt;empty&gt;", ) inc_login_failure("invalid_credentials") - return jsonify({"error": "invalid credentials"}), 401 + return jsonify({"error": "invalid credentials"}), 400 except Exception as e: app.logger.error("Database error in login: %s", e)</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests assert resp.status_code == 200 assert resp.is_json #check types assert isinstance(resp_data.get("token"), str) assert isinstance(resp_data.get("token_type"), str) assert isinstance(resp_data.get("expires_in"), int) #check val assert resp_data.get("token_type") == "bearer" #Test with missing parameters # Missing email resp = client.post("/api/login", json={"password": "password"}) assert resp.status_code == 400 # Missing password resp = client.post("/api/login", json={"email": "user@email.se"}) assert resp.status_code == 400 # Both missing resp = client.post("/api/login", json={}) assert resp.status_code == 400 # Malformed email - counts as non existing resp = client.post("/api/login", json={"email": "malformedemail", "password": "password"}) &gt; assert resp.status_code == 401 E assert 400 == 401 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:150: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:249 Missing fields in login attempt: {'password': 'password'} WARNING server:server.py:249 Missing fields in login attempt: {'email': 'user@email.se'} WARNING server:server.py:249 Missing fields in login attempt: {} WARNING server:server.py:272 Failed login attempt for email: malformedemail ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 400 == 401 1 failed, 41 passed, 23 warnings in 21.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1626"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1626_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1626_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1626_1"><button class="btn btn-outline-danger"><span class="job_id">1626 : Job ID ae31c325e3494102848ed42b7796754f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1626_1" data-parent="#job_list___sub_accordion_1626" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1626_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (282, 60), end pos: (282, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -279,7 +279,7 @@ except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") - return jsonify({"error": "An error occurred"}), 503 + return jsonify({"error": "An error occurred"}), 504 observe_db_latency("login_select", time.time() - start_db) token = _serializer().dumps(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1627"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1627_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1627_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1627_1"><button class="btn btn-outline-danger"><span class="job_id">1627 : Job ID 6b80d1db67bc4e5e9bd6ac424b4d371a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1627_1" data-parent="#job_list___sub_accordion_1627" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1627_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (282, 60), end pos: (282, 63)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -279,7 +279,7 @@ except Exception as e: app.logger.error("Database error in login: %s", e) inc_db_error("login_select") - return jsonify({"error": "An error occurred"}), 503 + return jsonify({"error": "An error occurred"}), 502 observe_db_latency("login_select", time.time() - start_db) token = _serializer().dumps(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1628"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1628_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1628_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1628_1"><button class="btn btn-outline-success"><span class="job_id">1628 : Job ID 5564a02fdaca4adc8bd97a80cccddb55</span></button></div></a><div aria-labelledby="job_list___sub_heading_1628_1" data-parent="#job_list___sub_accordion_1628" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1628_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=295" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (295, 11), end pos: (295, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -292,7 +292,7 @@ "token_type": "bearer", "expires_in": app.config["TOKEN_TTL_SECONDS"], } - ), 200 + ), 201 # POST /api/upload-document (multipart/form-data) @app.post("/api/upload-document")</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse 159 bytes [201 CREATED]&gt;.status_code ..\test\test_api.py:129: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1629"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1629_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1629_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1629_1"><button class="btn btn-outline-success"><span class="job_id">1629 : Job ID 05cbda30222544f095ced8a9f6d4a743</span></button></div></a><div aria-labelledby="job_list___sub_heading_1629_1" data-parent="#job_list___sub_accordion_1629" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1629_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=295" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (295, 11), end pos: (295, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -292,7 +292,7 @@ "token_type": "bearer", "expires_in": app.config["TOKEN_TTL_SECONDS"], } - ), 200 + ), 199 # POST /api/upload-document (multipart/form-data) @app.post("/api/upload-document")</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) &gt; resp_data = resp.get_json() ^^^^^^^^^^^^^^^ ..\test\test_api.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\wrappers\response.py:620: in get_json return self.json_module.loads(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\json\provider.py:187: in loads return json.loads(s, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py:346: in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;json.decoder.JSONDecoder object at 0x0000023BCDD012B0&gt;, s = '', idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: &gt; raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355: JSONDecodeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - json.decoder.JSONDecodeError: ... 1 failed, 41 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1630"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1630_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1630_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1630_1"><button class="btn btn-outline-success"><span class="job_id">1630 : Job ID 28b8c860d45048c9933bb18cf4813dbf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1630_1" data-parent="#job_list___sub_accordion_1630" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1630_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=304" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (304, 81), end pos: (304, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -301,7 +301,7 @@ if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") - return jsonify({"error": "file is required (multipart/form-data)"}), 400 + return jsonify({"error": "file is required (multipart/form-data)"}), 401 file = request.files["file"] if not file or file.filename == "":</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:180: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1631"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1631_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1631_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1631_1"><button class="btn btn-outline-success"><span class="job_id">1631 : Job ID aeaec32086b74eda8c5d4e551330b4d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1631_1" data-parent="#job_list___sub_accordion_1631" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1631_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=304" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (304, 81), end pos: (304, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -301,7 +301,7 @@ if "file" not in request.files: inc_suspicious("upload_missing_file_field") app.logger.warning("Upload attempt missing 'file' field") - return jsonify({"error": "file is required (multipart/form-data)"}), 400 + return jsonify({"error": "file is required (multipart/form-data)"}), 399 file = request.files["file"] if not file or file.filename == "":</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:180: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1632"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1632_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1632_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1632_1"><button class="btn btn-outline-danger"><span class="job_id">1632 : Job ID 35f2a417e1e045f4a0511f89cf8b77bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1632_1" data-parent="#job_list___sub_accordion_1632" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1632_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=309" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (309, 57), end pos: (309, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 44</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -306,7 +306,7 @@ file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") - return jsonify({"error": "empty filename"}), 400 + return jsonify({"error": "empty filename"}), 401 start_db = time.time() # Validate file size</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1633"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1633_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1633_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1633_1"><button class="btn btn-outline-danger"><span class="job_id">1633 : Job ID 704c6d12535f4a58b95fd1984d7f2e36</span></button></div></a><div aria-labelledby="job_list___sub_heading_1633_1" data-parent="#job_list___sub_accordion_1633" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1633_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=309" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (309, 57), end pos: (309, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 45</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -306,7 +306,7 @@ file = request.files["file"] if not file or file.filename == "": app.logger.warning("Upload attempt with empty filename") - return jsonify({"error": "empty filename"}), 400 + return jsonify({"error": "empty filename"}), 399 start_db = time.time() # Validate file size</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1634"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1634_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1634_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1634_1"><button class="btn btn-outline-success"><span class="job_id">1634 : Job ID 14720fb18adf4348b38e0edc924f2656</span></button></div></a><div aria-labelledby="job_list___sub_heading_1634_1" data-parent="#job_list___sub_accordion_1634" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1634_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 24), end pos: (313, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 46</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 51 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x00000259FD9A0780&gt;('id') E + where &lt;built-in method get of dict object at 0x00000259FD9A0780&gt; = {'creation': '2025-10-17T15:58:40.312082', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1635"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1635_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1635_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1635_1"><button class="btn btn-outline-danger"><span class="job_id">1635 : Job ID a53643fa93134407a087856216bcbeb0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1635_1" data-parent="#job_list___sub_accordion_1635" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1635_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 24), end pos: (313, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 47</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 49 * 1024 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1636"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1636_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1636_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1636_1"><button class="btn btn-outline-success"><span class="job_id">1636 : Job ID dd42d18fe0c04865a0677c15ce4fe0c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1636_1" data-parent="#job_list___sub_accordion_1636" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1636_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 29), end pos: (313, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 48</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1025 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x00000199647377C0&gt;('id') E + where &lt;built-in method get of dict object at 0x00000199647377C0&gt; = {'creation': '2025-10-17T14:29:37.564501', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1637"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1637_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1637_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1637_1"><button class="btn btn-outline-danger"><span class="job_id">1637 : Job ID a4aaed0a07954d5a886608109b33fe06</span></button></div></a><div aria-labelledby="job_list___sub_heading_1637_1" data-parent="#job_list___sub_accordion_1637" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1637_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 29), end pos: (313, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 49</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1023 * 1024 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1638"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1638_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1638_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1638_1"><button class="btn btn-outline-success"><span class="job_id">1638 : Job ID 69304cc5088145f0a1a79c329ed8f362</span></button></div></a><div aria-labelledby="job_list___sub_heading_1638_1" data-parent="#job_list___sub_accordion_1638" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1638_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 36), end pos: (313, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 50</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 * 1025 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 201 == 413 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 &gt; assert upload_resp_data.get("id") == 2 E AssertionError: assert 3 == 2 E + where 3 = &lt;built-in method get of dict object at 0x000001A3A75A6280&gt;('id') E + where &lt;built-in method get of dict object at 0x000001A3A75A6280&gt; = {'creation': '2025-10-17T12:10:09.452451', 'id': 3, 'name': 'Water File', 'sha256': '70E80023CAE0AB25227E6F011B7038B7E1F6BDD7AA1D3043E30223BCA945E768', ...}.get ..\test\test_api.py:405: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 201 == 413 FAILED ..\test\test_api.py::test_read_watermark_route - AssertionError: asser... 2 failed, 40 passed, 23 warnings in 21.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1639"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1639_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1639_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1639_1"><button class="btn btn-outline-danger"><span class="job_id">1639 : Job ID 0cc45ada5291483ab575d522954ce9c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1639_1" data-parent="#job_list___sub_accordion_1639" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1639_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=313" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (313, 36), end pos: (313, 40)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 51</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -310,7 +310,7 @@ start_db = time.time() # Validate file size - MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MB + MAX_FILE_SIZE = 50 * 1024 * 1023 # 50MB if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1640"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1640_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1640_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1640_1"><button class="btn btn-outline-success"><span class="job_id">1640 : Job ID 28c649b6f46845d9b46ff767cc498b21</span></button></div></a><div aria-labelledby="job_list___sub_heading_1640_1" data-parent="#job_list___sub_accordion_1640" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1640_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=317" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (317, 57), end pos: (317, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 52</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -314,7 +314,7 @@ if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) - return jsonify({"error": "file too large"}), 413 + return jsonify({"error": "file too large"}), 414 # Validate file type and MIME type if file.mimetype != "application/pdf":</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 414 == 413 E + where 414 = &lt;WrapperTestResponse streamed [414 REQUEST URI TOO LONG]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field WARNING server:server.py:316 Upload attempt with oversized file: bigfile.pdf ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 414 == 413 1 failed, 41 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1641"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1641_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1641_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1641_1"><button class="btn btn-outline-success"><span class="job_id">1641 : Job ID 29cf3103ca244070b6f68c9f1f3191d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1641_1" data-parent="#job_list___sub_accordion_1641" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1641_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=317" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (317, 57), end pos: (317, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 53</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -314,7 +314,7 @@ if file.content_length and file.content_length &gt; MAX_FILE_SIZE: inc_suspicious("upload_oversize") app.logger.warning("Upload attempt with oversized file: %s", file.filename) - return jsonify({"error": "file too large"}), 413 + return jsonify({"error": "file too large"}), 412 # Validate file type and MIME type if file.mimetype != "application/pdf":</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') &gt; assert resp.status_code == 413 E assert 412 == 413 E + where 412 = &lt;WrapperTestResponse streamed [412 PRECONDITION FAILED]&gt;.status_code ..\test\test_api.py:196: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field WARNING server:server.py:316 Upload attempt with oversized file: bigfile.pdf ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 412 == 413 1 failed, 41 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1642"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1642_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1642_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1642_1"><button class="btn btn-outline-success"><span class="job_id">1642 : Job ID 98d3f1650bc34f8293d4b904ce63427f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1642_1" data-parent="#job_list___sub_accordion_1642" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1642_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (325, 69), end pos: (325, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 54</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -322,7 +322,7 @@ app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) - return jsonify({"error": "only PDF files are allowed"}), 415 + return jsonify({"error": "only PDF files are allowed"}), 416 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') assert resp.status_code == 413 #Test with type error, txt file resp = client.post("/api/upload-document", data={'file': (BytesIO(b"example"), "test.txt", "text/plain"), 'name': 'file'}, content_type='multipart/form-data') &gt; assert resp.status_code == 415 E assert 416 == 415 E + where 416 = &lt;WrapperTestResponse streamed [416 REQUESTED RANGE NOT SATISFIABLE]&gt;.status_code ..\test\test_api.py:203: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field WARNING server:server.py:316 Upload attempt with oversized file: bigfile.pdf WARNING server:server.py:322 Upload attempt with invalid MIME type: text/plain ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 416 == 415 1 failed, 41 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1643"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1643_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1643_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1643_1"><button class="btn btn-outline-success"><span class="job_id">1643 : Job ID 3bf438330fd142c8b29a5b3905130191</span></button></div></a><div aria-labelledby="job_list___sub_heading_1643_1" data-parent="#job_list___sub_accordion_1643" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1643_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=325" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (325, 69), end pos: (325, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 55</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -322,7 +322,7 @@ app.logger.warning( "Upload attempt with invalid MIME type: %s", file.mimetype ) - return jsonify({"error": "only PDF files are allowed"}), 415 + return jsonify({"error": "only PDF files are allowed"}), 414 if not file.filename.lower().endswith(".pdf"): inc_suspicious("upload_bad_extension") app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">...F...................................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(resp_data.get("id"), int) #was string! Specification is wrong. assert isinstance(resp_data.get("name"), str) assert isinstance(resp_data.get("creation"), str) and datetime.fromisoformat(resp_data.get("creation")) assert isinstance(resp_data.get("sha256"), str) assert isinstance(resp_data.get("size"), int) #check value assert resp_data.get("name") == parameters["name"] #Test with missing file resp = client.post("/api/upload-document") assert resp.status_code == 400 #Test with too big file, 51 Mb content = b"%PDF-1.4\n" + b"0" * (50 * 1024 * 1024 + 1) # 50MB + 1 byte stream = BytesIO(content) file_storage = FileStorage(stream=stream, filename="bigfile.pdf", content_type="application/pdf") #Need to patch the content length, not included in flask test server with patch.object(FileStorage, 'content_length', new_callable=PropertyMock) as mock_content_length: mock_content_length.return_value = len(content) data = { 'file': (file_storage.stream, file_storage.filename, file_storage.content_type), 'name': 'My Big File' } resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') assert resp.status_code == 413 #Test with type error, txt file resp = client.post("/api/upload-document", data={'file': (BytesIO(b"example"), "test.txt", "text/plain"), 'name': 'file'}, content_type='multipart/form-data') &gt; assert resp.status_code == 415 E assert 414 == 415 E + where 414 = &lt;WrapperTestResponse streamed [414 REQUEST URI TOO LONG]&gt;.status_code ..\test\test_api.py:203: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:303 Upload attempt missing 'file' field WARNING server:server.py:316 Upload attempt with oversized file: bigfile.pdf WARNING server:server.py:322 Upload attempt with invalid MIME type: text/plain ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 414 == 415 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1644"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1644_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1644_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1644_1"><button class="btn btn-outline-danger"><span class="job_id">1644 : Job ID 4b282c1675e946af9b6de7d1c1a4709e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1644_1" data-parent="#job_list___sub_accordion_1644" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1644_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=331" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (331, 69), end pos: (331, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 56</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -328,7 +328,7 @@ app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) - return jsonify({"error": "only PDF files are allowed"}), 415 + return jsonify({"error": "only PDF files are allowed"}), 416 # Sanitize filename fname = secure_filename(file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1645"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1645_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1645_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1645_1"><button class="btn btn-outline-danger"><span class="job_id">1645 : Job ID 2f9f4a36c83f43248da4fe88f0abda1e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1645_1" data-parent="#job_list___sub_accordion_1645" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1645_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=331" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (331, 69), end pos: (331, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 57</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -328,7 +328,7 @@ app.logger.warning( "Upload attempt with invalid file extension: %s", file.filename ) - return jsonify({"error": "only PDF files are allowed"}), 415 + return jsonify({"error": "only PDF files are allowed"}), 414 # Sanitize filename fname = secure_filename(file.filename)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1646"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1646_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1646_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1646_1"><button class="btn btn-outline-danger"><span class="job_id">1646 : Job ID 05c3323133a24c089549cd437db449ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1646_1" data-parent="#job_list___sub_accordion_1646" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1646_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=339" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (339, 59), end pos: (339, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 58</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -336,7 +336,7 @@ app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) - return jsonify({"error": "invalid filename"}), 400 + return jsonify({"error": "invalid filename"}), 401 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1647"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1647_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1647_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1647_1"><button class="btn btn-outline-danger"><span class="job_id">1647 : Job ID d75f80548fe941a0833f46797b9f8a47</span></button></div></a><div aria-labelledby="job_list___sub_heading_1647_1" data-parent="#job_list___sub_accordion_1647" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1647_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=339" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (339, 59), end pos: (339, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 59</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -336,7 +336,7 @@ app.logger.warning( "Upload attempt with invalid filename: %s", file.filename ) - return jsonify({"error": "invalid filename"}), 400 + return jsonify({"error": "invalid filename"}), 399 user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] user_dir.mkdir(parents=True, exist_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1648"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1648_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1648_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1648_1"><button class="btn btn-outline-danger"><span class="job_id">1648 : Job ID af8ab56e0b70462fb2cedd47e659909e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1648_1" data-parent="#job_list___sub_accordion_1648" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1648_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=353" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (353, 59), end pos: (353, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 60</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -350,7 +350,7 @@ stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) - return jsonify({"error": "invalid path"}), 400 + return jsonify({"error": "invalid path"}), 401 file.save(stored_path) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1649"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1649_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1649_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1649_1"><button class="btn btn-outline-success"><span class="job_id">1649 : Job ID 151ea4e7295d4af69fe43ad70e3c5d3b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1649_1" data-parent="#job_list___sub_accordion_1649" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1649_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=353" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (353, 59), end pos: (353, 62)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 61</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -350,7 +350,7 @@ stored_path = (user_dir / stored_name).resolve() if not str(stored_path).startswith(str(user_dir.resolve())): app.logger.warning("Upload attempt with invalid path: %s", stored_path) - return jsonify({"error": "invalid path"}), 400 + return jsonify({"error": "invalid path"}), 399 file.save(stored_path) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004748828776Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T004749695873Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1650"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1650_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1650_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1650_1"><button class="btn btn-outline-danger"><span class="job_id">1650 : Job ID bae2ff22606c4d02b69419985d3e7a91</span></button></div></a><div aria-labelledby="job_list___sub_heading_1650_1" data-parent="#job_list___sub_accordion_1650" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1650_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=358" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (358, 62), end pos: (358, 65)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 62</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -355,7 +355,7 @@ file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) - return jsonify({"error": "failed to save file"}), 500 + return jsonify({"error": "failed to save file"}), 501 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1651"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1651_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1651_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1651_1"><button class="btn btn-outline-danger"><span class="job_id">1651 : Job ID deb247037d8d44d8a629d05175208417</span></button></div></a><div aria-labelledby="job_list___sub_heading_1651_1" data-parent="#job_list___sub_accordion_1651" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1651_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=358" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (358, 62), end pos: (358, 65)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 63</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -355,7 +355,7 @@ file.save(stored_path) except Exception as e: app.logger.error("File save error: %s", e) - return jsonify({"error": "failed to save file"}), 500 + return jsonify({"error": "failed to save file"}), 499 sha_hex = _sha256_file(stored_path) size = stored_path.stat().st_size</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1652"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1652_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1652_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1652_1"><button class="btn btn-outline-danger"><span class="job_id">1652 : Job ID 94578e83c7354d0299d2068820564e12</span></button></div></a><div aria-labelledby="job_list___sub_heading_1652_1" data-parent="#job_list___sub_accordion_1652" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1652_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=399" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (399, 66), end pos: (399, 69)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 64</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -396,7 +396,7 @@ int(g.user["id"]), ) inc_db_error("insert_document") - return jsonify({"error": "database error occurred"}), 503 + return jsonify({"error": "database error occurred"}), 504 observe_db_latency("insert_document", time.time() - start_db) resp_data = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1653"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1653_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1653_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1653_1"><button class="btn btn-outline-danger"><span class="job_id">1653 : Job ID 44b6058848944c97a00b891956e236e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1653_1" data-parent="#job_list___sub_accordion_1653" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1653_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=399" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (399, 66), end pos: (399, 69)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 65</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -396,7 +396,7 @@ int(g.user["id"]), ) inc_db_error("insert_document") - return jsonify({"error": "database error occurred"}), 503 + return jsonify({"error": "database error occurred"}), 502 observe_db_latency("insert_document", time.time() - start_db) resp_data = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1654"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1654_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1654_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1654_1"><button class="btn btn-outline-success"><span class="job_id">1654 : Job ID 40395a21e3334748a4ec21696e365930</span></button></div></a><div aria-labelledby="job_list___sub_heading_1654_1" data-parent="#job_list___sub_accordion_1654" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1654_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=412" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (412, 35), end pos: (412, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 66</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -409,7 +409,7 @@ "size": int(row.size), } inc_upload(int(row.size)) - return jsonify(resp_data), 201 + return jsonify(resp_data), 202 # GET /api/list-documents @app.get("/api/list-documents")</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 202 == 201 E + where 202 = &lt;WrapperTestResponse 155 bytes [202 ACCEPTED]&gt;.status_code ..\test\test_api.py:167: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 202 == 201 E + where 202 = &lt;WrapperTestResponse 158 bytes [202 ACCEPTED]&gt;.status_code ..\test\test_api.py:404: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 202 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 202 == 201 2 failed, 40 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1655"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1655_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1655_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1655_1"><button class="btn btn-outline-success"><span class="job_id">1655 : Job ID 0a5b6869de66475480e416af486f4ac1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1655_1" data-parent="#job_list___sub_accordion_1655" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1655_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=412" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (412, 35), end pos: (412, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 67</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -409,7 +409,7 @@ "size": int(row.size), } inc_upload(int(row.size)) - return jsonify(resp_data), 201 + return jsonify(resp_data), 200 # GET /api/list-documents @app.get("/api/list-documents")</pre></div><div class="alert alert-secondary"><pre class="diff">...F......F............................... [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 200 == 201 E + where 200 = &lt;WrapperTestResponse 155 bytes [200 OK]&gt;.status_code ..\test\test_api.py:167: AssertionError __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 200 == 201 E + where 200 = &lt;WrapperTestResponse 158 bytes [200 OK]&gt;.status_code ..\test\test_api.py:404: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 200 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 200 == 201 2 failed, 40 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1656"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1656_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1656_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1656_1"><button class="btn btn-outline-danger"><span class="job_id">1656 : Job ID 822308c083214ab3ab38d2265eedbab7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1656_1" data-parent="#job_list___sub_accordion_1656" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1656_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=436" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (436, 85), end pos: (436, 88)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 68</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -433,7 +433,7 @@ "Database error in list_documents for user=%s", g.user["id"] ) inc_db_error("list_documents") - return jsonify({"error": "An error occurred while fetching documents"}), 503 + return jsonify({"error": "An error occurred while fetching documents"}), 504 docs = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1657"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1657_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1657_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1657_1"><button class="btn btn-outline-danger"><span class="job_id">1657 : Job ID 8e044579ac124222928cec6a3794a4b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1657_1" data-parent="#job_list___sub_accordion_1657" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1657_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=436" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (436, 85), end pos: (436, 88)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 69</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -433,7 +433,7 @@ "Database error in list_documents for user=%s", g.user["id"] ) inc_db_error("list_documents") - return jsonify({"error": "An error occurred while fetching documents"}), 503 + return jsonify({"error": "An error occurred while fetching documents"}), 502 docs = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1658"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1658_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1658_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1658_1"><button class="btn btn-outline-success"><span class="job_id">1658 : Job ID 325bea047213480b8a43604916ae36b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1658_1" data-parent="#job_list___sub_accordion_1658" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1658_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=450" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (450, 45), end pos: (450, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 70</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -447,7 +447,7 @@ } for r in rows ] - return jsonify({"documents": docs}), 200 + return jsonify({"documents": docs}), 201 # GET /api/list-versions @app.get("/api/list-versions")</pre></div><div class="alert alert-secondary"><pre class="diff">....F..................................... [100%] ================================== FAILURES =================================== __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse 171 bytes [201 CREATED]&gt;.status_code ..\test\test_api.py:213: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_documents_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1659"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1659_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1659_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1659_1"><button class="btn btn-outline-success"><span class="job_id">1659 : Job ID 82b1d62aedfe4562bee4c20e5a16f4e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1659_1" data-parent="#job_list___sub_accordion_1659" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1659_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=450" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (450, 45), end pos: (450, 48)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 71</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -447,7 +447,7 @@ } for r in rows ] - return jsonify({"documents": docs}), 200 + return jsonify({"documents": docs}), 199 # GET /api/list-versions @app.get("/api/list-versions")</pre></div><div class="alert alert-secondary"><pre class="diff">....F..................................... [100%] ================================== FAILURES =================================== __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") &gt; resp_data = resp.get_json() ^^^^^^^^^^^^^^^ ..\test\test_api.py:210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\wrappers\response.py:620: in get_json return self.json_module.loads(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\json\provider.py:187: in loads return json.loads(s, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py:346: in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;json.decoder.JSONDecoder object at 0x00000200418C12B0&gt;, s = '', idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: &gt; raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355: JSONDecodeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_documents_route - json.decoder.JSONDeco... 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1660"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1660_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1660_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1660_1"><button class="btn btn-outline-success"><span class="job_id">1660 : Job ID 8d19b3b350ca4fc9a51d5c4dd4899ae2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1660_1" data-parent="#job_list___sub_accordion_1660" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1660_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 57), end pos: (462, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 72</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 1 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1661"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1661_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1661_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1661_1"><button class="btn btn-outline-danger"><span class="job_id">1661 : Job ID c6dbdb64c9674e7d8d9d0df18e7445e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1661_1" data-parent="#job_list___sub_accordion_1661" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1661_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=462" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (462, 57), end pos: (462, 58)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 73</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -459,7 +459,7 @@ document_id = request.args.get("id") or request.args.get("documentid") try: document_id = int(document_id) if document_id else None - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= -1 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1662"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1662_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1662_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1662_1"><button class="btn btn-outline-success"><span class="job_id">1662 : Job ID e8af2dc7eed54fb1b40c9e65553068af</span></button></div></a><div aria-labelledby="job_list___sub_heading_1662_1" data-parent="#job_list___sub_accordion_1662" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1662_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=464" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (464, 71), end pos: (464, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 74</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -461,7 +461,7 @@ document_id = int(document_id) if document_id else None if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 except (TypeError, ValueError): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:254: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1663"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1663_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1663_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1663_1"><button class="btn btn-outline-success"><span class="job_id">1663 : Job ID c8bc50a38c694d0b8aa24f06e7af40c7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1663_1" data-parent="#job_list___sub_accordion_1663" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1663_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=464" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (464, 71), end pos: (464, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 75</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -461,7 +461,7 @@ document_id = int(document_id) if document_id else None if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 except (TypeError, ValueError): app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:254: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1664"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1664_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1664_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1664_1"><button class="btn btn-outline-danger"><span class="job_id">1664 : Job ID 510aa5711aa74bb78be05edb0bf5f527</span></button></div></a><div aria-labelledby="job_list___sub_heading_1664_1" data-parent="#job_list___sub_accordion_1664" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1664_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=467" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (467, 67), end pos: (467, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 76</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -464,7 +464,7 @@ return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1665"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1665_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1665_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1665_1"><button class="btn btn-outline-success"><span class="job_id">1665 : Job ID 72428315da7046c9b9a567b8801c23c8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1665_1" data-parent="#job_list___sub_accordion_1665" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1665_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=467" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (467, 67), end pos: (467, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 77</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -464,7 +464,7 @@ return jsonify({"error": "document id required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113828706679Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T113829597571Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1666"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1666_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1666_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1666_1"><button class="btn btn-outline-success"><span class="job_id">1666 : Job ID 5544f5ae08844b239fbffabb04ca1fad</span></button></div></a><div aria-labelledby="job_list___sub_heading_1666_1" data-parent="#job_list___sub_accordion_1666" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1666_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 49), end pos: (469, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 78</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 1 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse 33 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 400 == 200 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1667"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1667_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1667_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1667_1"><button class="btn btn-outline-danger"><span class="job_id">1667 : Job ID 2e605001ce9544f49c4ab1f4ef3e7c06</span></button></div></a><div aria-labelledby="job_list___sub_heading_1667_1" data-parent="#job_list___sub_accordion_1667" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1667_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=469" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (469, 49), end pos: (469, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 79</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -466,7 +466,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= -1 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1668"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1668_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1668_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1668_1"><button class="btn btn-outline-danger"><span class="job_id">1668 : Job ID 5a733c8a5c224c49a1f99c83710749da</span></button></div></a><div aria-labelledby="job_list___sub_heading_1668_1" data-parent="#job_list___sub_accordion_1668" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1668_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=470" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (470, 63), end pos: (470, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 80</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -467,7 +467,7 @@ return jsonify({"error": "document id required"}), 400 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1669"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1669_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1669_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1669_1"><button class="btn btn-outline-danger"><span class="job_id">1669 : Job ID 8a61350092944db2af9b944608e1bfc5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1669_1" data-parent="#job_list___sub_accordion_1669" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1669_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=470" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (470, 63), end pos: (470, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 81</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -467,7 +467,7 @@ return jsonify({"error": "document id required"}), 400 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1670"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1670_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1670_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1670_1"><button class="btn btn-outline-success"><span class="job_id">1670 : Job ID 89b99fd51af44918917daadbd2812ded</span></button></div></a><div aria-labelledby="job_list___sub_heading_1670_1" data-parent="#job_list___sub_accordion_1670" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1670_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=489" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (489, 69), end pos: (489, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 82</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -486,7 +486,7 @@ app.logger.warning( "Document not found or access denied for id=%s", document_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 # Then fetch versions with ownership validation rows = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/list-versions", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/list-versions", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 405 == 404 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:260: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:486 Document not found or access denied for id=4 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 405 == 404 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1671"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1671_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1671_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1671_1"><button class="btn btn-outline-success"><span class="job_id">1671 : Job ID 1d75c83036ab4958962f97176faed0b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1671_1" data-parent="#job_list___sub_accordion_1671" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1671_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=489" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (489, 69), end pos: (489, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 83</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -486,7 +486,7 @@ app.logger.warning( "Document not found or access denied for id=%s", document_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 # Then fetch versions with ownership validation rows = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests assert resp.status_code == 200 assert resp.is_json #check types #extract data doc_list = resp_data.get("versions") assert isinstance(doc_list, list) #cycle through each element in the list for elem in doc_list: assert isinstance(elem.get("id"), str) assert isinstance(elem.get("documentid"), str) #check the version is from the correct document assert elem.get("documentid") == str(parameters["documentid"]) assert isinstance(elem.get("link"), str) assert isinstance(elem.get("intended_for"), str) assert isinstance(elem.get("secret"), str) assert isinstance(elem.get("method"), str) #Test with no parameters resp = client.get("/api/list-versions") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/list-versions", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/list-versions", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:260: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:463 Invalid document id in query WARNING server:server.py:486 Document not found or access denied for id=4 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 403 == 404 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1672"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1672_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1672_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1672_1"><button class="btn btn-outline-danger"><span class="job_id">1672 : Job ID c74135c4335347b98ba3c61983dab124</span></button></div></a><div aria-labelledby="job_list___sub_heading_1672_1" data-parent="#job_list___sub_accordion_1672" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1672_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=508" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (508, 84), end pos: (508, 87)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 84</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -505,7 +505,7 @@ f"Database error in list_versions: {document_id},{g.user['id']}" ) inc_db_error("list_versions") - return jsonify({"error": "An error occurred while fetching versions"}), 503 + return jsonify({"error": "An error occurred while fetching versions"}), 504 versions = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1673"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1673_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1673_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1673_1"><button class="btn btn-outline-danger"><span class="job_id">1673 : Job ID fdcc659a11464c2e8008230bcb8f403b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1673_1" data-parent="#job_list___sub_accordion_1673" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1673_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=508" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (508, 84), end pos: (508, 87)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 85</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -505,7 +505,7 @@ f"Database error in list_versions: {document_id},{g.user['id']}" ) inc_db_error("list_versions") - return jsonify({"error": "An error occurred while fetching versions"}), 503 + return jsonify({"error": "An error occurred while fetching versions"}), 502 versions = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1674"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1674_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1674_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1674_1"><button class="btn btn-outline-success"><span class="job_id">1674 : Job ID 807058333574401d91786e2c82e91abe</span></button></div></a><div aria-labelledby="job_list___sub_heading_1674_1" data-parent="#job_list___sub_accordion_1674" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1674_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=521" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (521, 48), end pos: (521, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 86</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -518,7 +518,7 @@ } for r in rows ] - return jsonify({"versions": versions}), 200 + return jsonify({"versions": versions}), 201 # GET /api/list-all-versions @app.get("/api/list-all-versions")</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse 16 bytes [201 CREATED]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1675"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1675_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1675_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1675_1"><button class="btn btn-outline-success"><span class="job_id">1675 : Job ID 5b36926fe05c40399b5feaaf4db3cde1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1675_1" data-parent="#job_list___sub_accordion_1675" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1675_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=521" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (521, 48), end pos: (521, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 87</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -518,7 +518,7 @@ } for r in rows ] - return jsonify({"versions": versions}), 200 + return jsonify({"versions": versions}), 199 # GET /api/list-all-versions @app.get("/api/list-all-versions")</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters &gt; resp_data = resp.get_json() ^^^^^^^^^^^^^^^ ..\test\test_api.py:232: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\wrappers\response.py:620: in get_json return self.json_module.loads(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\json\provider.py:187: in loads return json.loads(s, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py:346: in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;json.decoder.JSONDecoder object at 0x000001F762DB12B0&gt;, s = '', idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: &gt; raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355: JSONDecodeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - json.decoder.JSONDecod... 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1676"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1676_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1676_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1676_1"><button class="btn btn-outline-danger"><span class="job_id">1676 : Job ID 3a96fb08cb5441b48266b0162751f9b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1676_1" data-parent="#job_list___sub_accordion_1676" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1676_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=531" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (531, 69), end pos: (531, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 88</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -528,7 +528,7 @@ # Validate user data from auth token if not g.user or not g.user.get("id"): app.logger.error("Missing user info in auth token") - return jsonify({"error": "Invalid authentication"}), 401 + return jsonify({"error": "Invalid authentication"}), 402 with get_engine().connect() as conn: rows = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1677"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1677_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1677_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1677_1"><button class="btn btn-outline-danger"><span class="job_id">1677 : Job ID 7c3637b8b0c34ab0b606bc4daf1c3a53</span></button></div></a><div aria-labelledby="job_list___sub_heading_1677_1" data-parent="#job_list___sub_accordion_1677" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1677_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=531" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (531, 69), end pos: (531, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 89</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -528,7 +528,7 @@ # Validate user data from auth token if not g.user or not g.user.get("id"): app.logger.error("Missing user info in auth token") - return jsonify({"error": "Invalid authentication"}), 401 + return jsonify({"error": "Invalid authentication"}), 400 with get_engine().connect() as conn: rows = conn.execute(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1678"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1678_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1678_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1678_1"><button class="btn btn-outline-danger"><span class="job_id">1678 : Job ID 9fa2886978b142dbbcee3d37072a6efb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1678_1" data-parent="#job_list___sub_accordion_1678" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1678_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=549" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (549, 63), end pos: (549, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 90</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -546,7 +546,7 @@ ).all() except ValueError: app.logger.error("Invalid user ID in auth token") - return jsonify({"error": "Authentication error"}), 401 + return jsonify({"error": "Authentication error"}), 402 except Exception: app.logger.error( "Database error in list_all_versions for user=%s", g.user["id"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1679"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1679_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1679_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1679_1"><button class="btn btn-outline-danger"><span class="job_id">1679 : Job ID 6c0ee4855564495291915e8068f4f354</span></button></div></a><div aria-labelledby="job_list___sub_heading_1679_1" data-parent="#job_list___sub_accordion_1679" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1679_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=549" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (549, 63), end pos: (549, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 91</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -546,7 +546,7 @@ ).all() except ValueError: app.logger.error("Invalid user ID in auth token") - return jsonify({"error": "Authentication error"}), 401 + return jsonify({"error": "Authentication error"}), 400 except Exception: app.logger.error( "Database error in list_all_versions for user=%s", g.user["id"]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1680"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1680_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1680_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1680_1"><button class="btn btn-outline-danger"><span class="job_id">1680 : Job ID 19b0b105a8b74f828f954a0139a5efae</span></button></div></a><div aria-labelledby="job_list___sub_heading_1680_1" data-parent="#job_list___sub_accordion_1680" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1680_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=555" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (555, 84), end pos: (555, 87)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 92</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -552,7 +552,7 @@ "Database error in list_all_versions for user=%s", g.user["id"] ) inc_db_error("list_all_versions") - return jsonify({"error": "An error occurred while fetching versions"}), 503 + return jsonify({"error": "An error occurred while fetching versions"}), 504 versions = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1681"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1681_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1681_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1681_1"><button class="btn btn-outline-danger"><span class="job_id">1681 : Job ID 551bce2d37b1427fa5c5ebefc4beff34</span></button></div></a><div aria-labelledby="job_list___sub_heading_1681_1" data-parent="#job_list___sub_accordion_1681" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1681_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=555" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (555, 84), end pos: (555, 87)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 93</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -552,7 +552,7 @@ "Database error in list_all_versions for user=%s", g.user["id"] ) inc_db_error("list_all_versions") - return jsonify({"error": "An error occurred while fetching versions"}), 503 + return jsonify({"error": "An error occurred while fetching versions"}), 502 versions = [ {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1682"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1682_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1682_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1682_1"><button class="btn btn-outline-success"><span class="job_id">1682 : Job ID 68c50a1995c7438ca0861336f8babf8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1682_1" data-parent="#job_list___sub_accordion_1682" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1682_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=567" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (567, 48), end pos: (567, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 94</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -564,7 +564,7 @@ } for r in rows ] - return jsonify({"versions": versions}), 200 + return jsonify({"versions": versions}), 201 # GET /api/get-document or /api/get-document/&lt;id&gt;  returns the PDF (inline) @app.get("/api/get-document")</pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse 16 bytes [201 CREATED]&gt;.status_code ..\test\test_api.py:270: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1683"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1683_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1683_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1683_1"><button class="btn btn-outline-success"><span class="job_id">1683 : Job ID ff20ca6bd5c54d8f9a5ab5caf24c5dea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1683_1" data-parent="#job_list___sub_accordion_1683" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1683_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=567" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (567, 48), end pos: (567, 51)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 95</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -564,7 +564,7 @@ } for r in rows ] - return jsonify({"versions": versions}), 200 + return jsonify({"versions": versions}), 199 # GET /api/get-document or /api/get-document/&lt;id&gt;  returns the PDF (inline) @app.get("/api/get-document")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124105483587Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124106386928Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1684"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1684_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1684_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1684_1"><button class="btn btn-outline-success"><span class="job_id">1684 : Job ID 98e43faa7586436384736bd4f65245cc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1684_1" data-parent="#job_list___sub_accordion_1684" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1684_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=581" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (581, 67), end pos: (581, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 96</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -578,7 +578,7 @@ document_id = int(document_id) except (TypeError, ValueError): app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:302: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1685"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1685_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1685_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1685_1"><button class="btn btn-outline-success"><span class="job_id">1685 : Job ID cea062c4422f4eb3aa9e1ee774b5ac05</span></button></div></a><div aria-labelledby="job_list___sub_heading_1685_1" data-parent="#job_list___sub_accordion_1685" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1685_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=581" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (581, 67), end pos: (581, 70)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 97</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -578,7 +578,7 @@ document_id = int(document_id) except (TypeError, ValueError): app.logger.warning("Invalid document id in query") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:302: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1686"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1686_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1686_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1686_1"><button class="btn btn-outline-success"><span class="job_id">1686 : Job ID 00270d4499b04e7fa3215e0d5cf51259</span></button></div></a><div aria-labelledby="job_list___sub_heading_1686_1" data-parent="#job_list___sub_accordion_1686" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1686_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 49), end pos: (583, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 98</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= 1 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1687"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1687_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1687_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1687_1"><button class="btn btn-outline-danger"><span class="job_id">1687 : Job ID 4cc06dd7d19345529cd388e248ba7978</span></button></div></a><div aria-labelledby="job_list___sub_heading_1687_1" data-parent="#job_list___sub_accordion_1687" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1687_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=583" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (583, 49), end pos: (583, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 99</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -580,7 +580,7 @@ app.logger.warning("Invalid document id in query") return jsonify({"error": "document id required"}), 400 - if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: + if document_id is None or document_id &lt;= -1 or document_id &gt; MAX_DB_INT: return jsonify({"error": "document id required"}), 400 try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1688"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1688_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1688_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1688_1"><button class="btn btn-outline-danger"><span class="job_id">1688 : Job ID ede6597eaf4f4f2fb41bbe9e99901515</span></button></div></a><div aria-labelledby="job_list___sub_heading_1688_1" data-parent="#job_list___sub_accordion_1688" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1688_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=584" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (584, 63), end pos: (584, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 100</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -581,7 +581,7 @@ return jsonify({"error": "document id required"}), 400 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1689"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1689_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1689_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1689_1"><button class="btn btn-outline-danger"><span class="job_id">1689 : Job ID 96bf6f220447468a85cf63732d5ab407</span></button></div></a><div aria-labelledby="job_list___sub_heading_1689_1" data-parent="#job_list___sub_accordion_1689" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1689_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=584" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (584, 63), end pos: (584, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 101</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -581,7 +581,7 @@ return jsonify({"error": "document id required"}), 400 if document_id is None or document_id &lt;= 0 or document_id &gt; MAX_DB_INT: - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1690"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1690_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1690_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1690_1"><button class="btn btn-outline-danger"><span class="job_id">1690 : Job ID a1db6049c81e470c983ac100060333d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1690_1" data-parent="#job_list___sub_accordion_1690" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1690_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=606" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (606, 15), end pos: (606, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 102</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -603,7 +603,7 @@ inc_db_error("get_document") return jsonify( {"error": "An error occurred while fetching the document"} - ), 503 + ), 504 # Dont leak whether a doc exists for another user if not row:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1691"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1691_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1691_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1691_1"><button class="btn btn-outline-danger"><span class="job_id">1691 : Job ID 8598e207a66f47f69f84226c83508b43</span></button></div></a><div aria-labelledby="job_list___sub_heading_1691_1" data-parent="#job_list___sub_accordion_1691" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1691_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=606" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (606, 15), end pos: (606, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 103</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -603,7 +603,7 @@ inc_db_error("get_document") return jsonify( {"error": "An error occurred while fetching the document"} - ), 503 + ), 502 # Dont leak whether a doc exists for another user if not row:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1692"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1692_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1692_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1692_1"><button class="btn btn-outline-success"><span class="job_id">1692 : Job ID a507b1ad34bb4f3eb2ad1fad90caf4ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1692_1" data-parent="#job_list___sub_accordion_1692" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1692_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=613" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (613, 61), end pos: (613, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 104</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -610,7 +610,7 @@ app.logger.warning( "Document not found or access denied for id=%s", document_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 storage_root = app.config["STORAGE_DIR"].resolve() file_path = Path(row.path)</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/get-document", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/get-document", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 405 == 404 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:308: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:610 Document not found or access denied for id=4 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 405 == 404 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:460: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert 405 == 404 FAILED ..\test\test_api.py::test_delete_document_route - assert 405 == 404 2 failed, 40 passed, 23 warnings in 21.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1693"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1693_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1693_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1693_1"><button class="btn btn-outline-success"><span class="job_id">1693 : Job ID da74783bca8e4fbbac629a3ab5a914c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1693_1" data-parent="#job_list___sub_accordion_1693" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1693_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=613" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (613, 61), end pos: (613, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 105</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -610,7 +610,7 @@ app.logger.warning( "Document not found or access denied for id=%s", document_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 storage_root = app.config["STORAGE_DIR"].resolve() file_path = Path(row.path)</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline #Test with no parameters resp = client.get("/api/get-document") assert resp.status_code == 400 #Test with json parameters resp = client.get("/api/get-document", json = parameters) assert resp.status_code == 400 #Test with wrong parameters (missing file) resp = client.get("/api/get-document", query_string = {'documentid': 4}) &gt; assert resp.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:308: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:580 Invalid document id in query WARNING server:server.py:610 Document not found or access denied for id=4 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") &gt; assert resp_deletion.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:460: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert 403 == 404 FAILED ..\test\test_api.py::test_delete_document_route - assert 403 == 404 2 failed, 40 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1694"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1694_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1694_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1694_1"><button class="btn btn-outline-danger"><span class="job_id">1694 : Job ID 33b98ab91da14b29b6b52b793533ce21</span></button></div></a><div aria-labelledby="job_list___sub_heading_1694_1" data-parent="#job_list___sub_accordion_1694" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1694_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=627" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (627, 64), end pos: (627, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 106</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -624,7 +624,7 @@ app.logger.warning( "Rejected document path for id %s: %s", document_id, row.path ) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 501 if not resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1695"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1695_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1695_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1695_1"><button class="btn btn-outline-danger"><span class="job_id">1695 : Job ID 21bc3b86fcd1415e83b604660e99097f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1695_1" data-parent="#job_list___sub_accordion_1695" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1695_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=627" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (627, 64), end pos: (627, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 107</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -624,7 +624,7 @@ app.logger.warning( "Rejected document path for id %s: %s", document_id, row.path ) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 499 if not resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1696"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1696_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1696_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1696_1"><button class="btn btn-outline-danger"><span class="job_id">1696 : Job ID 22893782efee4b08a1bf0243e777bba7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1696_1" data-parent="#job_list___sub_accordion_1696" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1696_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=631" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (631, 63), end pos: (631, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 108</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -628,7 +628,7 @@ if not resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 # TOCTOU-safe open and validation try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1697"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1697_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1697_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1697_1"><button class="btn btn-outline-danger"><span class="job_id">1697 : Job ID 5d8695c8bbed4504beeab3b5f22fa038</span></button></div></a><div aria-labelledby="job_list___sub_heading_1697_1" data-parent="#job_list___sub_accordion_1697" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1697_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=631" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (631, 63), end pos: (631, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 109</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -628,7 +628,7 @@ if not resolved.exists(): app.logger.error("File missing on disk for document id=%s", document_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 # TOCTOU-safe open and validation try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1698"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1698_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1698_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1698_1"><button class="btn btn-outline-danger"><span class="job_id">1698 : Job ID 80867fc71d2e4ae58ff17d38a64434ee</span></button></div></a><div aria-labelledby="job_list___sub_heading_1698_1" data-parent="#job_list___sub_accordion_1698" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1698_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=638" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (638, 63), end pos: (638, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 110</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -635,7 +635,7 @@ f = open(resolved, "rb") except OSError: app.logger.error("File missing on disk for document id=%s", document_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 try: # Quick PDF signature check</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1699"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1699_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1699_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1699_1"><button class="btn btn-outline-danger"><span class="job_id">1699 : Job ID 7dd4ed4995e04ea783bf578c599ef2fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1699_1" data-parent="#job_list___sub_accordion_1699" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1699_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=638" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (638, 63), end pos: (638, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 111</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -635,7 +635,7 @@ f = open(resolved, "rb") except OSError: app.logger.error("File missing on disk for document id=%s", document_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 try: # Quick PDF signature check</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1700"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1700_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1700_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1700_1"><button class="btn btn-outline-success"><span class="job_id">1700 : Job ID 20178a5fe4ed45c285cf7a74a3c2e45a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1700_1" data-parent="#job_list___sub_accordion_1700" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1700_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=642" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (642, 26), end pos: (642, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 112</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -639,7 +639,7 @@ try: # Quick PDF signature check - head = f.read(5) + head = f.read( 6) if head != b"%PDF-": f.close() app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:645 Invalid PDF signature for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1701"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1701_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1701_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1701_1"><button class="btn btn-outline-success"><span class="job_id">1701 : Job ID ca32e9fcc3a74353b60f84c7942e3565</span></button></div></a><div aria-labelledby="job_list___sub_heading_1701_1" data-parent="#job_list___sub_accordion_1701" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1701_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=642" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (642, 26), end pos: (642, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 113</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -639,7 +639,7 @@ try: # Quick PDF signature check - head = f.read(5) + head = f.read( 4) if head != b"%PDF-": f.close() app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:645 Invalid PDF signature for document id=1 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1702"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1702_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1702_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1702_1"><button class="btn btn-outline-danger"><span class="job_id">1702 : Job ID 78738b3e16f04345bbf0fe1cd3da2890</span></button></div></a><div aria-labelledby="job_list___sub_heading_1702_1" data-parent="#job_list___sub_accordion_1702" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1702_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=648" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (648, 69), end pos: (648, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 114</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -645,7 +645,7 @@ app.logger.warning( "Invalid PDF signature for document id=%s", document_id ) - return jsonify({"error": "document not available"}), 415 + return jsonify({"error": "document not available"}), 416 f.seek(0) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1703"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1703_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1703_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1703_1"><button class="btn btn-outline-danger"><span class="job_id">1703 : Job ID df3d6948509e4ec1810359a4c069d963</span></button></div></a><div aria-labelledby="job_list___sub_heading_1703_1" data-parent="#job_list___sub_accordion_1703" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1703_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=648" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (648, 69), end pos: (648, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 115</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -645,7 +645,7 @@ app.logger.warning( "Invalid PDF signature for document id=%s", document_id ) - return jsonify({"error": "document not available"}), 415 + return jsonify({"error": "document not available"}), 414 f.seek(0) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1704"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1704_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1704_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1704_1"><button class="btn btn-outline-danger"><span class="job_id">1704 : Job ID 1b0083d3868948448a635c4d1faa4a86</span></button></div></a><div aria-labelledby="job_list___sub_heading_1704_1" data-parent="#job_list___sub_accordion_1704" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1704_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=650" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (650, 19), end pos: (650, 20)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 116</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -647,7 +647,7 @@ ) return jsonify({"error": "document not available"}), 415 - f.seek(0) + f.seek( 1) # Prepare safe filename (preserve existing .pdf if present) name = (row.name or "document").strip().replace("\r", "").replace("\n", "")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1705"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1705_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1705_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1705_1"><button class="btn btn-outline-success"><span class="job_id">1705 : Job ID f97b1ea312ae4840854002c46e0ab073</span></button></div></a><div aria-labelledby="job_list___sub_heading_1705_1" data-parent="#job_list___sub_accordion_1705" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1705_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=650" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (650, 19), end pos: (650, 20)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 117</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -647,7 +647,7 @@ ) return jsonify({"error": "document not available"}), 415 - f.seek(0) + f.seek( -1) # Prepare safe filename (preserve existing .pdf if present) name = (row.name or "document").strip().replace("\r", "").replace("\n", "")</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:687 Error serving file for document id=1: [Errno 22] Invalid argument ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1706"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1706_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1706_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1706_1"><button class="btn btn-outline-danger"><span class="job_id">1706 : Job ID 88591d40417a4757b317a0dff6edb05c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1706_1" data-parent="#job_list___sub_accordion_1706" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1706_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=666" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (666, 24), end pos: (666, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 118</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -663,7 +663,7 @@ as_attachment=False, download_name=name, conditional=False, # enables 304 if If-Modified-Since/Range handling - max_age=0, + max_age= 1, last_modified=st.st_mtime, ) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1707"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1707_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1707_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1707_1"><button class="btn btn-outline-danger"><span class="job_id">1707 : Job ID 5314b7c472934dd4aa33374971ec8ffd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1707_1" data-parent="#job_list___sub_accordion_1707" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1707_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=666" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (666, 24), end pos: (666, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 119</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -663,7 +663,7 @@ as_attachment=False, download_name=name, conditional=False, # enables 304 if If-Modified-Since/Range handling - max_age=0, + max_age= -1, last_modified=st.st_mtime, ) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1708"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1708_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1708_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1708_1"><button class="btn btn-outline-danger"><span class="job_id">1708 : Job ID 7f355bef32a743a6b0c79a1733072267</span></button></div></a><div aria-labelledby="job_list___sub_heading_1708_1" data-parent="#job_list___sub_accordion_1708" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1708_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=690" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (690, 61), end pos: (690, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 120</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -687,7 +687,7 @@ app.logger.error( "Error serving file for document id=%s: %s", document_id, e ) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 501 # GET /api/get-version/&lt;link&gt;  returns the watermarked PDF (inline) @app.get("/api/get-version/&lt;link&gt;")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1709"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1709_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1709_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1709_1"><button class="btn btn-outline-danger"><span class="job_id">1709 : Job ID 57b1f663f188490ab1953337e78597e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1709_1" data-parent="#job_list___sub_accordion_1709" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1709_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=690" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (690, 61), end pos: (690, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 121</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -687,7 +687,7 @@ app.logger.error( "Error serving file for document id=%s: %s", document_id, e ) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 499 # GET /api/get-version/&lt;link&gt;  returns the watermarked PDF (inline) @app.get("/api/get-version/&lt;link&gt;")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1710"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1710_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1710_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1710_1"><button class="btn btn-outline-success"><span class="job_id">1710 : Job ID 578e2cb603104325ab5951361248b9c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1710_1" data-parent="#job_list___sub_accordion_1710" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1710_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=698" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (698, 61), end pos: (698, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 122</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -695,7 +695,7 @@ # Accept both 32-char (RMAP session secrets) and 64-char (SHA-256 style) tokens if not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): app.logger.warning("Invalid version link format: %s", link) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614ec054430c97cba703'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline # Test with malformed request resp = client.get("/api/get-version/123malformedlink") &gt; assert resp.status_code == 404 E assert 405 == 404 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:618: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:697 Invalid version link format: 123malformedlink ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert 405 == 404 1 failed, 41 passed, 23 warnings in 21.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1711"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1711_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1711_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1711_1"><button class="btn btn-outline-success"><span class="job_id">1711 : Job ID 5c329cabb37d407794a3ad1b2091ab73</span></button></div></a><div aria-labelledby="job_list___sub_heading_1711_1" data-parent="#job_list___sub_accordion_1711" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1711_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=698" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (698, 61), end pos: (698, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 123</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -695,7 +695,7 @@ # Accept both 32-char (RMAP session secrets) and 64-char (SHA-256 style) tokens if not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link): app.logger.warning("Invalid version link format: %s", link) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e5c87e7ddcd8110c9'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle assert is_pdf assert is_inline # Test with malformed request resp = client.get("/api/get-version/123malformedlink") &gt; assert resp.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:618: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:697 Invalid version link format: 123malformedlink ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert 403 == 404 1 failed, 41 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1712"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1712_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1712_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1712_1"><button class="btn btn-outline-success"><span class="job_id">1712 : Job ID aab02840f8dc48ffa2a815f2630e830c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1712_1" data-parent="#job_list___sub_accordion_1712" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1712_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=716" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (716, 57), end pos: (716, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 124</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -713,7 +713,7 @@ except Exception as e: app.logger.error("Database error in get_version: %s", e) inc_db_error("get_version") - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 504 if not row: app.logger.warning("Version not found for link: %s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133655478535Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133656388646Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1713"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1713_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1713_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1713_1"><button class="btn btn-outline-danger"><span class="job_id">1713 : Job ID 0985f88daba141ac9d9d3b3291797c68</span></button></div></a><div aria-labelledby="job_list___sub_heading_1713_1" data-parent="#job_list___sub_accordion_1713" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1713_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=716" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (716, 57), end pos: (716, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 125</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -713,7 +713,7 @@ except Exception as e: app.logger.error("Database error in get_version: %s", e) inc_db_error("get_version") - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 502 if not row: app.logger.warning("Version not found for link: %s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1714"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1714_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1714_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1714_1"><button class="btn btn-outline-danger"><span class="job_id">1714 : Job ID ccbbcbe6c4aa431f8d09713d9f1e827d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1714_1" data-parent="#job_list___sub_accordion_1714" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1714_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=720" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (720, 61), end pos: (720, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 126</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -717,7 +717,7 @@ if not row: app.logger.warning("Version not found for link: %s", link) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 try: resolved = _safe_resolve_under_storage(row.path, app.config["STORAGE_DIR"])</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1715"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1715_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1715_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1715_1"><button class="btn btn-outline-danger"><span class="job_id">1715 : Job ID dff563383ba84ae9a41a70c33f8c383a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1715_1" data-parent="#job_list___sub_accordion_1715" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1715_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=720" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (720, 61), end pos: (720, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 127</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -717,7 +717,7 @@ if not row: app.logger.warning("Version not found for link: %s", link) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 try: resolved = _safe_resolve_under_storage(row.path, app.config["STORAGE_DIR"])</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1716"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1716_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1716_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1716_1"><button class="btn btn-outline-danger"><span class="job_id">1716 : Job ID 02f9caccc2be4631a3f467768381f8fc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1716_1" data-parent="#job_list___sub_accordion_1716" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1716_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=728" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (728, 64), end pos: (728, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 128</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -725,7 +725,7 @@ app.logger.warning( "Rejected version path for link %s: %s (%s)", link, row.path, exc ) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 501 if not resolved.exists(): app.logger.error("File missing on disk for version link=%s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1717"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1717_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1717_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1717_1"><button class="btn btn-outline-danger"><span class="job_id">1717 : Job ID ac3de8a642aa41f69d24e8e123bcb557</span></button></div></a><div aria-labelledby="job_list___sub_heading_1717_1" data-parent="#job_list___sub_accordion_1717" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1717_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=728" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (728, 64), end pos: (728, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 129</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -725,7 +725,7 @@ app.logger.warning( "Rejected version path for link %s: %s (%s)", link, row.path, exc ) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 499 if not resolved.exists(): app.logger.error("File missing on disk for version link=%s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1718"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1718_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1718_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1718_1"><button class="btn btn-outline-danger"><span class="job_id">1718 : Job ID 00ba20b9c775443c8e04c7445b4a068d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1718_1" data-parent="#job_list___sub_accordion_1718" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1718_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=732" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (732, 63), end pos: (732, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 130</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -729,7 +729,7 @@ if not resolved.exists(): app.logger.error("File missing on disk for version link=%s", link) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 try: with resolved.open("rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1719"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1719_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1719_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1719_1"><button class="btn btn-outline-danger"><span class="job_id">1719 : Job ID d7f32c1e43a046838526af4afbe71d8e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1719_1" data-parent="#job_list___sub_accordion_1719" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1719_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=732" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (732, 63), end pos: (732, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 131</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -729,7 +729,7 @@ if not resolved.exists(): app.logger.error("File missing on disk for version link=%s", link) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 try: with resolved.open("rb") as fh:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1720"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1720_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1720_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1720_1"><button class="btn btn-outline-success"><span class="job_id">1720 : Job ID 83ac4a75aab2474b8540f7898cf80192</span></button></div></a><div aria-labelledby="job_list___sub_heading_1720_1" data-parent="#job_list___sub_accordion_1720" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1720_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=736" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (736, 33), end pos: (736, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 132</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -733,7 +733,7 @@ try: with resolved.open("rb") as fh: - header = fh.read(5) + header = fh.read( 6) if header != b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e1e7da96d07f63285'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614e1e7da96d07f63285 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1721"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1721_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1721_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1721_1"><button class="btn btn-outline-success"><span class="job_id">1721 : Job ID 2538235db3ae4d0ea4f46f10c0fc094d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1721_1" data-parent="#job_list___sub_accordion_1721" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1721_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=736" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (736, 33), end pos: (736, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 133</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -733,7 +733,7 @@ try: with resolved.open("rb") as fh: - header = fh.read(5) + header = fh.read( 4) if header != b"%PDF-": app.logger.warning( "Invalid PDF signature for version link=%s", link</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e5ee917565f7bda44'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:738 Invalid PDF signature for version link=0000000000bc614e5ee917565f7bda44 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1722"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1722_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1722_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1722_1"><button class="btn btn-outline-danger"><span class="job_id">1722 : Job ID 11c09e70cbf045a797f6da90a90c415a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1722_1" data-parent="#job_list___sub_accordion_1722" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1722_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=741" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (741, 73), end pos: (741, 76)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 134</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -738,7 +738,7 @@ app.logger.warning( "Invalid PDF signature for version link=%s", link ) - return jsonify({"error": "document not available"}), 415 + return jsonify({"error": "document not available"}), 416 fh.seek(0) last_modified = os.fstat(fh.fileno()).st_mtime except OSError:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1723"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1723_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1723_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1723_1"><button class="btn btn-outline-danger"><span class="job_id">1723 : Job ID 46d9825ffae1470bb286ffb32dad6b47</span></button></div></a><div aria-labelledby="job_list___sub_heading_1723_1" data-parent="#job_list___sub_accordion_1723" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1723_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=741" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (741, 73), end pos: (741, 76)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 135</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -738,7 +738,7 @@ app.logger.warning( "Invalid PDF signature for version link=%s", link ) - return jsonify({"error": "document not available"}), 415 + return jsonify({"error": "document not available"}), 414 fh.seek(0) last_modified = os.fstat(fh.fileno()).st_mtime except OSError:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1724"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1724_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1724_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1724_1"><button class="btn btn-outline-danger"><span class="job_id">1724 : Job ID 959dfba6af734f899b24fd56d08377b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1724_1" data-parent="#job_list___sub_accordion_1724" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1724_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=742" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (742, 24), end pos: (742, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 136</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -739,7 +739,7 @@ "Invalid PDF signature for version link=%s", link ) return jsonify({"error": "document not available"}), 415 - fh.seek(0) + fh.seek( 1) last_modified = os.fstat(fh.fileno()).st_mtime except OSError: app.logger.error("File missing on disk for version link=%s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1725"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1725_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1725_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1725_1"><button class="btn btn-outline-success"><span class="job_id">1725 : Job ID f6ac1881dced47bc877f6ced4a43bd56</span></button></div></a><div aria-labelledby="job_list___sub_heading_1725_1" data-parent="#job_list___sub_accordion_1725" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1725_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=742" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (742, 24), end pos: (742, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 137</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -739,7 +739,7 @@ "Invalid PDF signature for version link=%s", link ) return jsonify({"error": "document not available"}), 415 - fh.seek(0) + fh.seek( -1) last_modified = os.fstat(fh.fileno()).st_mtime except OSError: app.logger.error("File missing on disk for version link=%s", link)</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e3b3cc2d804ac731c'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:745 File missing on disk for version link=0000000000bc614e3b3cc2d804ac731c ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1726"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1726_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1726_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1726_1"><button class="btn btn-outline-danger"><span class="job_id">1726 : Job ID 3adeb42267514ef287b6127d626a4dfb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1726_1" data-parent="#job_list___sub_accordion_1726" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1726_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=746" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (746, 63), end pos: (746, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 138</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -743,7 +743,7 @@ last_modified = os.fstat(fh.fileno()).st_mtime except OSError: app.logger.error("File missing on disk for version link=%s", link) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 except Exception as e: app.logger.error("Error inspecting version file for %s: %s", link, e) return jsonify({"error": "error serving file"}), 500</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1727"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1727_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1727_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1727_1"><button class="btn btn-outline-danger"><span class="job_id">1727 : Job ID fec7901fe5d34e518e7c5d2df938777e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1727_1" data-parent="#job_list___sub_accordion_1727" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1727_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=746" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (746, 63), end pos: (746, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 139</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -743,7 +743,7 @@ last_modified = os.fstat(fh.fileno()).st_mtime except OSError: app.logger.error("File missing on disk for version link=%s", link) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 except Exception as e: app.logger.error("Error inspecting version file for %s: %s", link, e) return jsonify({"error": "error serving file"}), 500</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1728"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1728_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1728_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1728_1"><button class="btn btn-outline-danger"><span class="job_id">1728 : Job ID ccbf68721f9d4c3fb6d55b7c3ca5f011</span></button></div></a><div aria-labelledby="job_list___sub_heading_1728_1" data-parent="#job_list___sub_accordion_1728" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1728_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=749" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (749, 61), end pos: (749, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 140</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -746,7 +746,7 @@ return jsonify({"error": "file missing on disk"}), 410 except Exception as e: app.logger.error("Error inspecting version file for %s: %s", link, e) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 501 download_name = ( row.link if row.link.lower().endswith(".pdf") else f"{row.link}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1729"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1729_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1729_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1729_1"><button class="btn btn-outline-danger"><span class="job_id">1729 : Job ID caf07f995e414cdfb0bf7bf016656a6c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1729_1" data-parent="#job_list___sub_accordion_1729" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1729_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=749" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (749, 61), end pos: (749, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 141</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -746,7 +746,7 @@ return jsonify({"error": "file missing on disk"}), 410 except Exception as e: app.logger.error("Error inspecting version file for %s: %s", link, e) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 499 download_name = ( row.link if row.link.lower().endswith(".pdf") else f"{row.link}.pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1730"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1730_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1730_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1730_1"><button class="btn btn-outline-danger"><span class="job_id">1730 : Job ID 78270e92b39449efbd326f06eaeeb21a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1730_1" data-parent="#job_list___sub_accordion_1730" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1730_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=763" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (763, 24), end pos: (763, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 142</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -760,7 +760,7 @@ as_attachment=False, download_name=safe_download, conditional=True, - max_age=0, + max_age= 1, last_modified=last_modified, ) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1731"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1731_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1731_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1731_1"><button class="btn btn-outline-danger"><span class="job_id">1731 : Job ID dd185faa85ce477b9be6711d4b031c97</span></button></div></a><div aria-labelledby="job_list___sub_heading_1731_1" data-parent="#job_list___sub_accordion_1731" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1731_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=763" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (763, 24), end pos: (763, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 143</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -760,7 +760,7 @@ as_attachment=False, download_name=safe_download, conditional=True, - max_age=0, + max_age= -1, last_modified=last_modified, ) except Exception as e:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1732"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1732_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1732_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1732_1"><button class="btn btn-outline-danger"><span class="job_id">1732 : Job ID f67b17d03459475799e06e5a2fe35a89</span></button></div></a><div aria-labelledby="job_list___sub_heading_1732_1" data-parent="#job_list___sub_accordion_1732" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1732_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=768" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (768, 61), end pos: (768, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 144</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -765,7 +765,7 @@ ) except Exception as e: app.logger.error("Error serving version %s: %s", link, e) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 501 resp.headers["Cache-Control"] = "private, max-age=0, must-revalidate" resp.headers["Content-Type"] = "application/pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1733"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1733_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1733_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1733_1"><button class="btn btn-outline-danger"><span class="job_id">1733 : Job ID 52adb5a105564669ad9ec6c528d9a944</span></button></div></a><div aria-labelledby="job_list___sub_heading_1733_1" data-parent="#job_list___sub_accordion_1733" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1733_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=768" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (768, 61), end pos: (768, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 145</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -765,7 +765,7 @@ ) except Exception as e: app.logger.error("Error serving version %s: %s", link, e) - return jsonify({"error": "error serving file"}), 500 + return jsonify({"error": "error serving file"}), 499 resp.headers["Cache-Control"] = "private, max-age=0, must-revalidate" resp.headers["Content-Type"] = "application/pdf"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1734"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1734_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1734_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1734_1"><button class="btn btn-outline-danger"><span class="job_id">1734 : Job ID c6098d23289243c29591a2f2ee1c58b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1734_1" data-parent="#job_list___sub_accordion_1734" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1734_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=815" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (815, 63), end pos: (815, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 146</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -812,7 +812,7 @@ if document_id is None: app.logger.warning("Document id required for deletion") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 try: doc_id = int(document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1735"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1735_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1735_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1735_1"><button class="btn btn-outline-danger"><span class="job_id">1735 : Job ID 1830814d39a34aa4852b672c46f287c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1735_1" data-parent="#job_list___sub_accordion_1735" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1735_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=815" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (815, 63), end pos: (815, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 147</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -812,7 +812,7 @@ if document_id is None: app.logger.warning("Document id required for deletion") - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 try: doc_id = int(document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1736"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1736_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1736_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1736_1"><button class="btn btn-outline-danger"><span class="job_id">1736 : Job ID 64e3b2ae0db84e37a1afa10f8bfa5221</span></button></div></a><div aria-labelledby="job_list___sub_heading_1736_1" data-parent="#job_list___sub_accordion_1736" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1736_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=821" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (821, 63), end pos: (821, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 148</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -818,7 +818,7 @@ doc_id = int(document_id) except (TypeError, ValueError): app.logger.warning("Invalid document id for deletion: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1737"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1737_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1737_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1737_1"><button class="btn btn-outline-danger"><span class="job_id">1737 : Job ID 3539486d7f9847dd96a71edcd93803c9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1737_1" data-parent="#job_list___sub_accordion_1737" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1737_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=821" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (821, 63), end pos: (821, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 149</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -818,7 +818,7 @@ doc_id = int(document_id) except (TypeError, ValueError): app.logger.warning("Invalid document id for deletion: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1738"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1738_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1738_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1738_1"><button class="btn btn-outline-danger"><span class="job_id">1738 : Job ID 3061abefd6724b7a9df8a64afd605422</span></button></div></a><div aria-labelledby="job_list___sub_heading_1738_1" data-parent="#job_list___sub_accordion_1738" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1738_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 21), end pos: (823, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 150</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 1 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1739"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1739_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1739_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1739_1"><button class="btn btn-outline-success"><span class="job_id">1739 : Job ID b5a99959090844fa8f9d26209a1dd038</span></button></div></a><div aria-labelledby="job_list___sub_heading_1739_1" data-parent="#job_list___sub_accordion_1739" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1739_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=823" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (823, 21), end pos: (823, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 151</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -820,7 +820,7 @@ app.logger.warning("Invalid document id for deletion: %s", document_id) return jsonify({"error": "document id required"}), 400 - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= -1 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) return jsonify({"error": "document id required"}), 400 </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") assert resp_deletion.status_code == 404 #Test missing id resp = client.delete("/api/delete-document") &gt; assert resp.status_code == 400 E assert 404 == 400 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:464: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=2 WARNING server:server.py:850 Document not found or access denied for deletion id=0 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 400 1 failed, 41 passed, 23 warnings in 21.36s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1740"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1740_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1740_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1740_1"><button class="btn btn-outline-success"><span class="job_id">1740 : Job ID 4304dcdb2f514861bfb523012f15f0fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1740_1" data-parent="#job_list___sub_accordion_1740" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1740_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=825" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (825, 63), end pos: (825, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 152</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -822,7 +822,7 @@ if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 owner_id = int(g.user["id"]) </pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted resp_deletion = client.get("/api/get-document/2") assert resp_deletion.status_code == 404 #Test missing id resp = client.delete("/api/delete-document") &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:464: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=2 WARNING server:server.py:824 Non-positive document id for deletion: 0 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1741"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1741_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1741_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1741_1"><button class="btn btn-outline-success"><span class="job_id">1741 : Job ID c26911b57deb4678952f24eca8fb06a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1741_1" data-parent="#job_list___sub_accordion_1741" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1741_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=825" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (825, 63), end pos: (825, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 153</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -822,7 +822,7 @@ if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: app.logger.warning("Non-positive document id for deletion: %s", doc_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 owner_id = int(g.user["id"]) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003306338375Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003307238653Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1742"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1742_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1742_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1742_1"><button class="btn btn-outline-danger"><span class="job_id">1742 : Job ID aa89ec1b62a94793855619454201cf26</span></button></div></a><div aria-labelledby="job_list___sub_heading_1742_1" data-parent="#job_list___sub_accordion_1742" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1742_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=846" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (846, 71), end pos: (846, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 154</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -843,7 +843,7 @@ except Exception as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_select") - return jsonify({"error": "database error during delete"}), 503 + return jsonify({"error": "database error during delete"}), 504 if not row: # Dont reveal others docsjust say not found</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1743"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1743_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1743_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1743_1"><button class="btn btn-outline-danger"><span class="job_id">1743 : Job ID ae9da7385f5144dfb33c3c3c98fd4359</span></button></div></a><div aria-labelledby="job_list___sub_heading_1743_1" data-parent="#job_list___sub_accordion_1743" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1743_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=846" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (846, 71), end pos: (846, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 155</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -843,7 +843,7 @@ except Exception as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_select") - return jsonify({"error": "database error during delete"}), 503 + return jsonify({"error": "database error during delete"}), 502 if not row: # Dont reveal others docsjust say not found</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1744"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1744_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1744_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1744_1"><button class="btn btn-outline-success"><span class="job_id">1744 : Job ID f1db8d302d184fd8bbc859d6fae6f06d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1744_1" data-parent="#job_list___sub_accordion_1744" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1744_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=853" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (853, 61), end pos: (853, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 156</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -850,7 +850,7 @@ app.logger.warning( "Document not found or access denied for deletion id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 # Resolve and delete file (best effort) storage_root = Path(app.config["STORAGE_DIR"])</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T151228944657Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T151229826554Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 405 == 200 8 failed, 34 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1745"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1745_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1745_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1745_1"><button class="btn btn-outline-danger"><span class="job_id">1745 : Job ID 244386e1d80d4213a947ecaa99e18c6d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1745_1" data-parent="#job_list___sub_accordion_1745" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1745_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=853" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (853, 61), end pos: (853, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 157</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -850,7 +850,7 @@ app.logger.warning( "Document not found or access denied for deletion id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 # Resolve and delete file (best effort) storage_root = Path(app.config["STORAGE_DIR"])</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1746"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1746_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1746_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1746_1"><button class="btn btn-outline-danger"><span class="job_id">1746 : Job ID 10b0621dda18476babf05f0f613210e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1746_1" data-parent="#job_list___sub_accordion_1746" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1746_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=892" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (892, 71), end pos: (892, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 158</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -889,7 +889,7 @@ except Exception as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_delete") - return jsonify({"error": "database error during delete"}), 503 + return jsonify({"error": "database error during delete"}), 504 return jsonify( {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1747"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1747_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1747_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1747_1"><button class="btn btn-outline-danger"><span class="job_id">1747 : Job ID b5ff870421314a13950f2d79acb734a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1747_1" data-parent="#job_list___sub_accordion_1747" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1747_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=892" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (892, 71), end pos: (892, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 159</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -889,7 +889,7 @@ except Exception as e: app.logger.error("DB delete error for doc id=%s: %s", doc_id, e) inc_db_error("delete_document_delete") - return jsonify({"error": "database error during delete"}), 503 + return jsonify({"error": "database error during delete"}), 502 return jsonify( {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1748"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1748_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1748_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1748_1"><button class="btn btn-outline-success"><span class="job_id">1748 : Job ID a2555d1c46e6416d858a76602916a22f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1748_1" data-parent="#job_list___sub_accordion_1748" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1748_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=902" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (902, 11), end pos: (902, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 160</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -899,7 +899,7 @@ "file_missing": file_missing, "note": delete_error, # null/omitted if everything was fine } - ), 200 + ), 201 # POST /api/create-watermark or /api/create-watermark/&lt;id&gt; #  create watermarked pdf and returns metadata</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse streamed [201 CREATED]&gt;.status_code ..\test\test_api.py:457: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 201 == 200 1 failed, 41 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1749"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1749_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1749_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1749_1"><button class="btn btn-outline-success"><span class="job_id">1749 : Job ID 508ea988a89742a087944468acd5ade5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1749_1" data-parent="#job_list___sub_accordion_1749" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1749_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=902" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (902, 11), end pos: (902, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 161</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -899,7 +899,7 @@ "file_missing": file_missing, "note": delete_error, # null/omitted if everything was fine } - ), 200 + ), 199 # POST /api/create-watermark or /api/create-watermark/&lt;id&gt; #  create watermarked pdf and returns metadata</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 199 == 200 E + where 199 = &lt;WrapperTestResponse streamed [199 UNKNOWN]&gt;.status_code ..\test\test_api.py:457: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 199 == 200 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1750"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1750_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1750_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1750_1"><button class="btn btn-outline-danger"><span class="job_id">1750 : Job ID 688c86e70d0e4f0f809f43192a21e3bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1750_1" data-parent="#job_list___sub_accordion_1750" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1750_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=921" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (921, 63), end pos: (921, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 162</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -918,7 +918,7 @@ doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1751"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1751_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1751_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1751_1"><button class="btn btn-outline-danger"><span class="job_id">1751 : Job ID 04b6110244ce438ab6ba8ff06729654a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1751_1" data-parent="#job_list___sub_accordion_1751" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1751_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=921" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (921, 63), end pos: (921, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 163</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -918,7 +918,7 @@ doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1752"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1752_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1752_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1752_1"><button class="btn btn-outline-success"><span class="job_id">1752 : Job ID 694cd763aaa24866b48ece7c3d80f702</span></button></div></a><div aria-labelledby="job_list___sub_heading_1752_1" data-parent="#job_list___sub_accordion_1752" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1752_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=935" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (935, 76), end pos: (935, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 164</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -932,7 +932,7 @@ try: if doc_id is None: app.logger.warning("Missing document id in request") - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:369: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1753"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1753_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1753_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1753_1"><button class="btn btn-outline-success"><span class="job_id">1753 : Job ID 5beefcd6042d4c088427e97da0933c97</span></button></div></a><div aria-labelledby="job_list___sub_heading_1753_1" data-parent="#job_list___sub_accordion_1753" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1753_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=935" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (935, 76), end pos: (935, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 165</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -932,7 +932,7 @@ try: if doc_id is None: app.logger.warning("Missing document id in request") - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:369: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1754"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1754_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1754_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1754_1"><button class="btn btn-outline-success"><span class="job_id">1754 : Job ID 309aeba894364589a50cebce6f68b65a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1754_1" data-parent="#job_list___sub_accordion_1754" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1754_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 25), end pos: (937, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 166</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 1 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 42 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1755"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1755_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1755_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1755_1"><button class="btn btn-outline-danger"><span class="job_id">1755 : Job ID f8f51c1fe96842f28fd338eddfd87335</span></button></div></a><div aria-labelledby="job_list___sub_heading_1755_1" data-parent="#job_list___sub_accordion_1755" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1755_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=937" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (937, 25), end pos: (937, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 167</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -934,7 +934,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= -1 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1756"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1756_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1756_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1756_1"><button class="btn btn-outline-danger"><span class="job_id">1756 : Job ID 37d7eb1bbd3a4da7bf2b27956ed41648</span></button></div></a><div aria-labelledby="job_list___sub_heading_1756_1" data-parent="#job_list___sub_accordion_1756" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1756_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=938" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (938, 76), end pos: (938, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 168</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -935,7 +935,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1757"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1757_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1757_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1757_1"><button class="btn btn-outline-danger"><span class="job_id">1757 : Job ID 879c37e73f5d4963b7301ed56615209d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1757_1" data-parent="#job_list___sub_accordion_1757" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1757_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=938" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (938, 76), end pos: (938, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 169</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -935,7 +935,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1758"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1758_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1758_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1758_1"><button class="btn btn-outline-danger"><span class="job_id">1758 : Job ID f259d162672b4b8582c406be71f8e440</span></button></div></a><div aria-labelledby="job_list___sub_heading_1758_1" data-parent="#job_list___sub_accordion_1758" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1758_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=941" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (941, 72), end pos: (941, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 170</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -938,7 +938,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 if ( not method or not intended_for</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1759"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1759_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1759_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1759_1"><button class="btn btn-outline-danger"><span class="job_id">1759 : Job ID 67f9e5f11ff642888551cf232086b895</span></button></div></a><div aria-labelledby="job_list___sub_heading_1759_1" data-parent="#job_list___sub_accordion_1759" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1759_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=941" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (941, 72), end pos: (941, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 171</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -938,7 +938,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 if ( not method or not intended_for</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1760"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1760_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1760_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1760_1"><button class="btn btn-outline-success"><span class="job_id">1760 : Job ID 4b9a5b0be6b24db2815ddfae9aae0150</span></button></div></a><div aria-labelledby="job_list___sub_heading_1760_1" data-parent="#job_list___sub_accordion_1760" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1760_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=951" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (951, 15), end pos: (951, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 172</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -948,7 +948,7 @@ app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} - ), 400 + ), 401 # lookup the document; enforce ownership try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:373: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1761"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1761_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1761_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1761_1"><button class="btn btn-outline-success"><span class="job_id">1761 : Job ID f2c0363234dc4ef6aea5a371d1a3ed5c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1761_1" data-parent="#job_list___sub_accordion_1761" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1761_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=951" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (951, 15), end pos: (951, 18)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 173</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -948,7 +948,7 @@ app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify( {"error": "method, intended_for, secret, and key are required"} - ), 400 + ), 399 # lookup the document; enforce ownership try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:373: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1762"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1762_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1762_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1762_1"><button class="btn btn-outline-danger"><span class="job_id">1762 : Job ID 237bb2feadc14d45a2527bc3024b65d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1762_1" data-parent="#job_list___sub_accordion_1762" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1762_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=969" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (969, 57), end pos: (969, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 174</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -966,7 +966,7 @@ ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 504 if not row: app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1763"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1763_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1763_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1763_1"><button class="btn btn-outline-danger"><span class="job_id">1763 : Job ID 695da94fcfc34bf8bcfebc1bcea5d95e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1763_1" data-parent="#job_list___sub_accordion_1763" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1763_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=969" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (969, 57), end pos: (969, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 175</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -966,7 +966,7 @@ ).first() except Exception as e: app.logger.error("Database error fetching document %s", e) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 502 if not row: app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1764"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1764_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1764_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1764_1"><button class="btn btn-outline-success"><span class="job_id">1764 : Job ID b538744bf0904e738a84559ffee04c26</span></button></div></a><div aria-labelledby="job_list___sub_heading_1764_1" data-parent="#job_list___sub_accordion_1764" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1764_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=975" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (975, 61), end pos: (975, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 176</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -972,7 +972,7 @@ app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve()</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105609036089Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse 31 bytes [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105609929920Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 405 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1765"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1765_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1765_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1765_1"><button class="btn btn-outline-success"><span class="job_id">1765 : Job ID 7e139d23264a4dcc82e5e21530282e39</span></button></div></a><div aria-labelledby="job_list___sub_heading_1765_1" data-parent="#job_list___sub_accordion_1765" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1765_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=975" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (975, 61), end pos: (975, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 177</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -972,7 +972,7 @@ app.logger.warning( "Document not found or access denied for watermarking id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve()</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) &gt; assert resp.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:365: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 403 == 404 1 failed, 41 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1766"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1766_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1766_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1766_1"><button class="btn btn-outline-danger"><span class="job_id">1766 : Job ID ea29b614ec4748458d46853cea8aa04b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1766_1" data-parent="#job_list___sub_accordion_1766" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1766_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=987" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (987, 64), end pos: (987, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 178</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -984,7 +984,7 @@ file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 501 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1767"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1767_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1767_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1767_1"><button class="btn btn-outline-danger"><span class="job_id">1767 : Job ID c2a6ab8d654d468291082199068bbdf4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1767_1" data-parent="#job_list___sub_accordion_1767" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1767_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=987" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (987, 64), end pos: (987, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 179</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -984,7 +984,7 @@ file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 499 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1768"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1768_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1768_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1768_1"><button class="btn btn-outline-danger"><span class="job_id">1768 : Job ID 57451395ccc84c7eab9f4bcca19fc33e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1768_1" data-parent="#job_list___sub_accordion_1768" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1768_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=990" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (990, 63), end pos: (990, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 180</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -987,7 +987,7 @@ return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 # check watermark applicability try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1769"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1769_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1769_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1769_1"><button class="btn btn-outline-danger"><span class="job_id">1769 : Job ID ac416d33280b467da920d1a9c6ed9075</span></button></div></a><div aria-labelledby="job_list___sub_heading_1769_1" data-parent="#job_list___sub_accordion_1769" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1769_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=990" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (990, 63), end pos: (990, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 181</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -987,7 +987,7 @@ return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 # check watermark applicability try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1770"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1770_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1770_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1770_1"><button class="btn btn-outline-danger"><span class="job_id">1770 : Job ID 18ddcecdd5ad48fd981ec42c4b112b54</span></button></div></a><div aria-labelledby="job_list___sub_heading_1770_1" data-parent="#job_list___sub_accordion_1770" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1770_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1004" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1004, 81), end pos: (1004, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 182</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1001,7 +1001,7 @@ method, doc_id, ) - return jsonify({"error": "watermarking method not applicable"}), 400 + return jsonify({"error": "watermarking method not applicable"}), 401 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1771"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1771_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1771_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1771_1"><button class="btn btn-outline-danger"><span class="job_id">1771 : Job ID ed0f8f7cf3da400392910bc023883811</span></button></div></a><div aria-labelledby="job_list___sub_heading_1771_1" data-parent="#job_list___sub_accordion_1771" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1771_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1004" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1004, 81), end pos: (1004, 84)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 183</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1001,7 +1001,7 @@ method, doc_id, ) - return jsonify({"error": "watermarking method not applicable"}), 400 + return jsonify({"error": "watermarking method not applicable"}), 399 except Exception as e: inc_watermark_failed(method, "applicability_exception") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1772"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1772_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1772_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1772_1"><button class="btn btn-outline-success"><span class="job_id">1772 : Job ID 65a8e4a0e68a49e4837db033db7cdf0e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1772_1" data-parent="#job_list___sub_accordion_1772" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1772_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1010" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1010, 79), end pos: (1010, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 184</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1007,7 +1007,7 @@ app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) - return jsonify({"error": "watermark applicability check failed"}), 400 + return jsonify({"error": "watermark applicability check failed"}), 401 # apply watermark  bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:361: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1773"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1773_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1773_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1773_1"><button class="btn btn-outline-success"><span class="job_id">1773 : Job ID b18e85e26fe64033981de7c7e63f5f35</span></button></div></a><div aria-labelledby="job_list___sub_heading_1773_1" data-parent="#job_list___sub_accordion_1773" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1773_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1010" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1010, 79), end pos: (1010, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 185</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1007,7 +1007,7 @@ app.logger.error( "Watermark applicability check failed for document %s: %s", doc_id, e ) - return jsonify({"error": "watermark applicability check failed"}), 400 + return jsonify({"error": "watermark applicability check failed"}), 399 # apply watermark  bytes try:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:361: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1774"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1774_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1774_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1774_1"><button class="btn btn-outline-danger"><span class="job_id">1774 : Job ID bfaf0a30b1174dc1a13d1fedd947ba0d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1774_1" data-parent="#job_list___sub_accordion_1774" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1774_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 81), end pos: (1024, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 186</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 1: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1775"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1775_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1775_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1775_1"><button class="btn btn-outline-danger"><span class="job_id">1775 : Job ID c09a65e41bd444129a03f1492e042f4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1775_1" data-parent="#job_list___sub_accordion_1775" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1775_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1024" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1024, 81), end pos: (1024, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 187</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1021,7 +1021,7 @@ position=position, ) observe_watermark_duration(method, time.time() - _wm_start) - if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == 0: + if not isinstance(wm_bytes, (bytes | bytearray)) or len(wm_bytes) == -1: inc_watermark_failed(method, "empty_output") app.logger.error( "Watermarking produced no output for document %s using method %s",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1776"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1776_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1776_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1776_1"><button class="btn btn-outline-danger"><span class="job_id">1776 : Job ID 15f79a707aa04f67af64b34ff3ef3bea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1776_1" data-parent="#job_list___sub_accordion_1776" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1776_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1031" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1031, 78), end pos: (1031, 81)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 188</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1028,7 +1028,7 @@ doc_id, method, ) - return jsonify({"error": "watermarking produced no output"}), 500 + return jsonify({"error": "watermarking produced no output"}), 501 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1777"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1777_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1777_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1777_1"><button class="btn btn-outline-danger"><span class="job_id">1777 : Job ID 2e7a74b09dd341eba7fa35749e25c834</span></button></div></a><div aria-labelledby="job_list___sub_heading_1777_1" data-parent="#job_list___sub_accordion_1777" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1777_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1031" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1031, 78), end pos: (1031, 81)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 189</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1028,7 +1028,7 @@ doc_id, method, ) - return jsonify({"error": "watermarking produced no output"}), 500 + return jsonify({"error": "watermarking produced no output"}), 499 except Exception as e: inc_watermark_failed(method, "exception") app.logger.error(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1778"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1778_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1778_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1778_1"><button class="btn btn-outline-success"><span class="job_id">1778 : Job ID b934d6a3ad974adaaa929e056907525d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1778_1" data-parent="#job_list___sub_accordion_1778" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1778_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1040" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1040, 62), end pos: (1040, 65)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 190</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1037,7 +1037,7 @@ method, e, ) - return jsonify({"error": "watermarking failed"}), 500 + return jsonify({"error": "watermarking failed"}), 501 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105351406218Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105352270678Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1779"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1779_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1779_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1779_1"><button class="btn btn-outline-danger"><span class="job_id">1779 : Job ID 5fe632c177df413785f6039455c471c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1779_1" data-parent="#job_list___sub_accordion_1779" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1779_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1040" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1040, 62), end pos: (1040, 65)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 191</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1037,7 +1037,7 @@ method, e, ) - return jsonify({"error": "watermarking failed"}), 500 + return jsonify({"error": "watermarking failed"}), 499 # build destination file name: "&lt;original_name&gt;__&lt;intended_to&gt;.pdf" base_name = Path(row.name or file_path.name).stem</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1780"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1780_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1780_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1780_1"><button class="btn btn-outline-danger"><span class="job_id">1780 : Job ID f79e67f780c64cea8ca377a4f24e48f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1780_1" data-parent="#job_list___sub_accordion_1780" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1780_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1062" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1062, 75), end pos: (1062, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 192</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1059,7 +1059,7 @@ doc_id, e, ) - return jsonify({"error": "failed to write watermarked file"}), 500 + return jsonify({"error": "failed to write watermarked file"}), 501 # link token = sha256(watermarked_file_name) - using stronger hash link_token = hashlib.sha256(candidate.encode("utf-8")).hexdigest()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1781"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1781_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1781_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1781_1"><button class="btn btn-outline-danger"><span class="job_id">1781 : Job ID b0c55df12833491da7ef2c9878d89448</span></button></div></a><div aria-labelledby="job_list___sub_heading_1781_1" data-parent="#job_list___sub_accordion_1781" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1781_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1062" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1062, 75), end pos: (1062, 78)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 193</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1059,7 +1059,7 @@ doc_id, e, ) - return jsonify({"error": "failed to write watermarked file"}), 500 + return jsonify({"error": "failed to write watermarked file"}), 499 # link token = sha256(watermarked_file_name) - using stronger hash link_token = hashlib.sha256(candidate.encode("utf-8")).hexdigest()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1782"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1782_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1782_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1782_1"><button class="btn btn-outline-success"><span class="job_id">1782 : Job ID 12d0abc63f63492399a75779e9062e51</span></button></div></a><div aria-labelledby="job_list___sub_heading_1782_1" data-parent="#job_list___sub_accordion_1782" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1782_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1101" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1101, 79), end pos: (1101, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 194</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1098,7 +1098,7 @@ "Integrity error during version insert for document %s: %s", doc_id, ie ) inc_db_error("insert_version") - return jsonify({"error": "database error during version insert"}), 503 + return jsonify({"error": "database error during version insert"}), 504 except Exception: try: dest_path.unlink(missing_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) &gt; assert resp.status_code == 503 E assert 504 == 503 E + where 504 = &lt;WrapperTestResponse streamed [504 GATEWAY TIMEOUT]&gt;.status_code ..\test\test_api.py:357: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 504 == 503 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1783"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1783_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1783_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1783_1"><button class="btn btn-outline-success"><span class="job_id">1783 : Job ID 2dfd1dd517554d6abff3b97d935d1897</span></button></div></a><div aria-labelledby="job_list___sub_heading_1783_1" data-parent="#job_list___sub_accordion_1783" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1783_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1101" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1101, 79), end pos: (1101, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 195</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1098,7 +1098,7 @@ "Integrity error during version insert for document %s: %s", doc_id, ie ) inc_db_error("insert_version") - return jsonify({"error": "database error during version insert"}), 503 + return jsonify({"error": "database error during version insert"}), 502 except Exception: try: dest_path.unlink(missing_ok=True)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000051498528Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T000052383192Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1784"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1784_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1784_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1784_1"><button class="btn btn-outline-danger"><span class="job_id">1784 : Job ID 75f888207abe428cadf47aa6bb440fde</span></button></div></a><div aria-labelledby="job_list___sub_heading_1784_1" data-parent="#job_list___sub_accordion_1784" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1784_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1113" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1113, 79), end pos: (1113, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 196</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1110,7 +1110,7 @@ "Database error during version insert for document %s", doc_id ) inc_db_error("insert_version") - return jsonify({"error": "database error during version insert"}), 503 + return jsonify({"error": "database error during version insert"}), 504 inc_watermark_created(method) return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1785"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1785_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1785_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1785_1"><button class="btn btn-outline-danger"><span class="job_id">1785 : Job ID 5228a6b7f4c64b6c858b461c62ef6de1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1785_1" data-parent="#job_list___sub_accordion_1785" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1785_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1113" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1113, 79), end pos: (1113, 82)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 197</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1110,7 +1110,7 @@ "Database error during version insert for document %s", doc_id ) inc_db_error("insert_version") - return jsonify({"error": "database error during version insert"}), 503 + return jsonify({"error": "database error during version insert"}), 502 inc_watermark_created(method) return jsonify(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1786"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1786_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1786_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1786_1"><button class="btn btn-outline-success"><span class="job_id">1786 : Job ID aa1149fd851944f29029a28a9817d5a3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1786_1" data-parent="#job_list___sub_accordion_1786" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1786_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1127" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1127, 11), end pos: (1127, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 198</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1124,7 +1124,7 @@ "filename": candidate, "size": len(wm_bytes), } - ), 201 + ), 202 # GET /api/get-watermarking-methods #  {"methods":[{"name":..., "description":...}, ...], "count":N}</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 202 == 201 E + where 202 = &lt;WrapperTestResponse 229 bytes [202 ACCEPTED]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 202 == 201 1 failed, 41 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1787"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1787_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1787_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1787_1"><button class="btn btn-outline-success"><span class="job_id">1787 : Job ID 40197c2bd97440ca8fd068ddef5aa463</span></button></div></a><div aria-labelledby="job_list___sub_heading_1787_1" data-parent="#job_list___sub_accordion_1787" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1787_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1127" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1127, 11), end pos: (1127, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 199</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1124,7 +1124,7 @@ "filename": candidate, "size": len(wm_bytes), } - ), 201 + ), 200 # GET /api/get-watermarking-methods #  {"methods":[{"name":..., "description":...}, ...], "count":N}</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170143988775Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170144855582Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1788"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1788_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1788_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1788_1"><button class="btn btn-outline-success"><span class="job_id">1788 : Job ID 67d9b0eb5d0348949a380800af6607e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1788_1" data-parent="#job_list___sub_accordion_1788" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1788_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1140" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1140, 69), end pos: (1140, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 200</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1137,7 +1137,7 @@ {"name": m, "description": WMUtils.get_method(m).get_usage()} ) - return jsonify({"methods": methods, "count": len(methods)}), 200 + return jsonify({"methods": methods, "count": len(methods)}), 201 # POST /api/read-watermark @app.post("/api/read-watermark")</pre></div><div class="alert alert-secondary"><pre class="diff">........F................................. [100%] ================================== FAILURES =================================== _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" resp = client.get("/api/get-watermarking-methods") data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 201 == 200 E + where 201 = &lt;WrapperTestResponse 532 bytes [201 CREATED]&gt;.status_code ..\test\test_api.py:316: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_watermarking_methods_route - assert 201 ... 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1789"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1789_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1789_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1789_1"><button class="btn btn-outline-success"><span class="job_id">1789 : Job ID 110cea2f021d4c5dbf652b4472ac1929</span></button></div></a><div aria-labelledby="job_list___sub_heading_1789_1" data-parent="#job_list___sub_accordion_1789" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1789_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1140" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1140, 69), end pos: (1140, 72)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 201</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1137,7 +1137,7 @@ {"name": m, "description": WMUtils.get_method(m).get_usage()} ) - return jsonify({"methods": methods, "count": len(methods)}), 200 + return jsonify({"methods": methods, "count": len(methods)}), 199 # POST /api/read-watermark @app.post("/api/read-watermark")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.FFFFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170333038413Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" resp = client.get("/api/get-watermarking-methods") &gt; data = resp.get_json() ^^^^^^^^^^^^^^^ ..\test\test_api.py:313: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\wrappers\response.py:620: in get_json return self.json_module.loads(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\json\provider.py:187: in loads return json.loads(s, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py:346: in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;json.decoder.JSONDecoder object at 0x0000012124C712B0&gt;, s = '', idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: &gt; raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355: JSONDecodeError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170333965158Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_get_watermarking_methods_route - json.decode... FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1790"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1790_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1790_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1790_1"><button class="btn btn-outline-danger"><span class="job_id">1790 : Job ID 8851f81446a14ba1bd9395d056481ec6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1790_1" data-parent="#job_list___sub_accordion_1790" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1790_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1158" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1158, 63), end pos: (1158, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 202</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1155,7 +1155,7 @@ doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 401 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1791"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1791_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1791_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1791_1"><button class="btn btn-outline-danger"><span class="job_id">1791 : Job ID e91bb495cb414d1a8272c483d1a4f402</span></button></div></a><div aria-labelledby="job_list___sub_heading_1791_1" data-parent="#job_list___sub_accordion_1791" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1791_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1158" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1158, 63), end pos: (1158, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 203</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1155,7 +1155,7 @@ doc_id = document_id except (TypeError, ValueError): app.logger.warning("Invalid document id in query: %s", document_id) - return jsonify({"error": "document id required"}), 400 + return jsonify({"error": "document id required"}), 399 payload = request.get_json(silent=True) or {} # allow a couple of aliases for convenience</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1792"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1792_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1792_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1792_1"><button class="btn btn-outline-success"><span class="job_id">1792 : Job ID 2dbfc48c231649d5b45d3d59b04349b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1792_1" data-parent="#job_list___sub_accordion_1792" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1792_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1170" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1170, 76), end pos: (1170, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 204</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1167,7 +1167,7 @@ try: if doc_id is None: app.logger.warning("Missing document id in request") - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:437: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1793"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1793_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1793_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1793_1"><button class="btn btn-outline-success"><span class="job_id">1793 : Job ID 3310215b6f2f443bbc733990638fd64c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1793_1" data-parent="#job_list___sub_accordion_1793" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1793_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1170" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1170, 76), end pos: (1170, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 205</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1167,7 +1167,7 @@ try: if doc_id is None: app.logger.warning("Missing document id in request") - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:437: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 WARNING server:server.py:1169 Missing document id in request ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 23.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1794"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1794_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1794_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1794_1"><button class="btn btn-outline-danger"><span class="job_id">1794 : Job ID 47b83ac2e07d4a4d81bb5ebc636960d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1794_1" data-parent="#job_list___sub_accordion_1794" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1794_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 25), end pos: (1172, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 206</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= 1 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1795"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1795_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1795_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1795_1"><button class="btn btn-outline-danger"><span class="job_id">1795 : Job ID f0db028d7e824d999294ae0a1ca4a1b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1795_1" data-parent="#job_list___sub_accordion_1795" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1795_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1172" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1172, 25), end pos: (1172, 26)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 207</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1169,7 +1169,7 @@ app.logger.warning("Missing document id in request") return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) - if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: + if doc_id &lt;= -1 or doc_id &gt; MAX_DB_INT: return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1796"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1796_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1796_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1796_1"><button class="btn btn-outline-danger"><span class="job_id">1796 : Job ID e7b12e2a1def492094b8e01ca5b72684</span></button></div></a><div aria-labelledby="job_list___sub_heading_1796_1" data-parent="#job_list___sub_accordion_1796" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1796_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1173" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1173, 76), end pos: (1173, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 208</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1170,7 +1170,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1797"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1797_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1797_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1797_1"><button class="btn btn-outline-danger"><span class="job_id">1797 : Job ID 63e83fa694b1466494a41e2e578e306d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1797_1" data-parent="#job_list___sub_accordion_1797" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1797_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1173" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1173, 76), end pos: (1173, 79)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 209</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1170,7 +1170,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 doc_id = int(doc_id) if doc_id &lt;= 0 or doc_id &gt; MAX_DB_INT: - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) return jsonify({"error": "document_id (int) is required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1798"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1798_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1798_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1798_1"><button class="btn btn-outline-danger"><span class="job_id">1798 : Job ID 41ec9fea3d4c4813a3d31c2e6d12241e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1798_1" data-parent="#job_list___sub_accordion_1798" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1798_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1176" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1176, 72), end pos: (1176, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 210</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1173,7 +1173,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 401 if not method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1799"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1799_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1799_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1799_1"><button class="btn btn-outline-danger"><span class="job_id">1799 : Job ID c423d334186d4c2d8f01950faf27d8ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_1799_1" data-parent="#job_list___sub_accordion_1799" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1799_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1176" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1176, 72), end pos: (1176, 75)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 211</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1173,7 +1173,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 except (TypeError, ValueError): app.logger.warning("Invalid document id: %s", document_id) - return jsonify({"error": "document_id (int) is required"}), 400 + return jsonify({"error": "document_id (int) is required"}), 399 if not method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) return jsonify({"error": "method, and key are required"}), 400</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1800"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1800_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1800_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1800_1"><button class="btn btn-outline-success"><span class="job_id">1800 : Job ID a951b182f3634a95ab220cabf15ebbef</span></button></div></a><div aria-labelledby="job_list___sub_heading_1800_1" data-parent="#job_list___sub_accordion_1800" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1800_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1179" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1179, 71), end pos: (1179, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 212</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1176,7 +1176,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 if not method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) - return jsonify({"error": "method, and key are required"}), 400 + return jsonify({"error": "method, and key are required"}), 401 # lookup the document; enforce ownership try:</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/read-watermark", json={"position": "metadata-only", "key": "strong-password", "id": 2}) &gt; assert resp.status_code == 400 E assert 401 == 400 E + where 401 = &lt;WrapperTestResponse streamed [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:441: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 WARNING server:server.py:1169 Missing document id in request WARNING server:server.py:1178 Missing required fields for watermarking: {'id': 2, 'key': 'strong-password', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 401 == 400 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1801"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1801_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1801_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1801_1"><button class="btn btn-outline-success"><span class="job_id">1801 : Job ID 3afb94f6ac02466482aca291ac69101f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1801_1" data-parent="#job_list___sub_accordion_1801" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1801_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1179" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1179, 71), end pos: (1179, 74)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 213</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1176,7 +1176,7 @@ return jsonify({"error": "document_id (int) is required"}), 400 if not method or not isinstance(method, str) or not isinstance(key, str): app.logger.warning("Missing required fields for watermarking: %s", payload) - return jsonify({"error": "method, and key are required"}), 400 + return jsonify({"error": "method, and key are required"}), 399 # lookup the document; enforce ownership try:</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/read-watermark", json={"position": "metadata-only", "key": "strong-password", "id": 2}) &gt; assert resp.status_code == 400 E assert 399 == 400 E + where 399 = &lt;WrapperTestResponse streamed [399 UNKNOWN]&gt;.status_code ..\test\test_api.py:441: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 WARNING server:server.py:1169 Missing document id in request WARNING server:server.py:1178 Missing required fields for watermarking: {'id': 2, 'key': 'strong-password', 'position': 'metadata-only'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 399 == 400 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1802"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1802_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1802_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1802_1"><button class="btn btn-outline-danger"><span class="job_id">1802 : Job ID eb21c8e03dd345e2a2a48a30c1929fe5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1802_1" data-parent="#job_list___sub_accordion_1802" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1802_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1199" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1199, 57), end pos: (1199, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 214</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1196,7 +1196,7 @@ app.logger.error( "Database error fetching document %s for watermark read: %s", doc_id, e ) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 504 if not row: app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1803"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1803_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1803_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1803_1"><button class="btn btn-outline-danger"><span class="job_id">1803 : Job ID 7689f41346f640cd97ebc1787357b7d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1803_1" data-parent="#job_list___sub_accordion_1803" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1803_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1199" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1199, 57), end pos: (1199, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 215</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1196,7 +1196,7 @@ app.logger.error( "Database error fetching document %s for watermark read: %s", doc_id, e ) - return jsonify({"error": "database error"}), 503 + return jsonify({"error": "database error"}), 502 if not row: app.logger.warning(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1804"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1804_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1804_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1804_1"><button class="btn btn-outline-success"><span class="job_id">1804 : Job ID 1a4183287dbf433c984341a7771d3882</span></button></div></a><div aria-labelledby="job_list___sub_heading_1804_1" data-parent="#job_list___sub_accordion_1804" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1804_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1205" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1205, 61), end pos: (1205, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 216</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1202,7 +1202,7 @@ app.logger.warning( "Document not found or access denied for watermark read id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 405 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve()</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) &gt; assert resp.status_code == 404 E assert 405 == 404 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:432: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 405 == 404 1 failed, 41 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1805"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1805_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1805_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1805_1"><button class="btn btn-outline-success"><span class="job_id">1805 : Job ID f9721da14ba4492189dbe4e2b26e07e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1805_1" data-parent="#job_list___sub_accordion_1805" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1805_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1205" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1205, 61), end pos: (1205, 64)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 217</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1202,7 +1202,7 @@ app.logger.warning( "Document not found or access denied for watermark read id=%s", doc_id ) - return jsonify({"error": "document not found"}), 404 + return jsonify({"error": "document not found"}), 403 # resolve path safely under STORAGE_DIR storage_root = Path(app.config["STORAGE_DIR"]).resolve()</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("documentid"), int) assert isinstance(data.get("secret"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) #check values assert data.get("documentid") == parameters["id"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Non existant id resp = client.post("/api/read-watermark", json={"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 8}) &gt; assert resp.status_code == 404 E assert 403 == 404 E + where 403 = &lt;WrapperTestResponse streamed [403 FORBIDDEN]&gt;.status_code ..\test\test_api.py:432: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:1202 Document not found or access denied for watermark read id=8 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 403 == 404 1 failed, 41 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1806"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1806_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1806_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1806_1"><button class="btn btn-outline-danger"><span class="job_id">1806 : Job ID 375c1f671f4548778cdfe770adce0e4c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1806_1" data-parent="#job_list___sub_accordion_1806" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1806_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1217" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1217, 64), end pos: (1217, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 218</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1214,7 +1214,7 @@ file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 501 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1807"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1807_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1807_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1807_1"><button class="btn btn-outline-danger"><span class="job_id">1807 : Job ID 63e0e4d14f2742e59b790630cdcb67e4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1807_1" data-parent="#job_list___sub_accordion_1807" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1807_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1217" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1217, 64), end pos: (1217, 67)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 219</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1214,7 +1214,7 @@ file_path.relative_to(storage_root) except ValueError: app.logger.warning("Rejected document path for id %s: %s", doc_id, row.path) - return jsonify({"error": "document path invalid"}), 500 + return jsonify({"error": "document path invalid"}), 499 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) return jsonify({"error": "file missing on disk"}), 410</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1808"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1808_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1808_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1808_1"><button class="btn btn-outline-danger"><span class="job_id">1808 : Job ID 987bf143c1aa444b8e131ef18b48e445</span></button></div></a><div aria-labelledby="job_list___sub_heading_1808_1" data-parent="#job_list___sub_accordion_1808" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1808_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1220" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1220, 63), end pos: (1220, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 220</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1217,7 +1217,7 @@ return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 411 secret = None try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1809"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1809_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1809_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1809_1"><button class="btn btn-outline-danger"><span class="job_id">1809 : Job ID 2daf5442887c4e8a973ff76203626397</span></button></div></a><div aria-labelledby="job_list___sub_heading_1809_1" data-parent="#job_list___sub_accordion_1809" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1809_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1220" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1220, 63), end pos: (1220, 66)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 221</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1217,7 +1217,7 @@ return jsonify({"error": "document path invalid"}), 500 if not file_path.exists(): app.logger.error("File missing on disk for document id=%s", doc_id) - return jsonify({"error": "file missing on disk"}), 410 + return jsonify({"error": "file missing on disk"}), 409 secret = None try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1810"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1810_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1810_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1810_1"><button class="btn btn-outline-danger"><span class="job_id">1810 : Job ID f77a5cf2c65249f5b44a6463b12c785c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1810_1" data-parent="#job_list___sub_accordion_1810" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1810_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1229, 82), end pos: (1229, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 222</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1226,7 +1226,7 @@ app.logger.error( "Error when attempting to read watermark for document %s: %s", doc_id, e ) - return jsonify({"error": "error when attempting to read watermark"}), 400 + return jsonify({"error": "error when attempting to read watermark"}), 401 inc_watermark_read(method) return jsonify( {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1811"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1811_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1811_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1811_1"><button class="btn btn-outline-danger"><span class="job_id">1811 : Job ID f10d4631416e4f4f82096cab3311973f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1811_1" data-parent="#job_list___sub_accordion_1811" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1811_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1229" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1229, 82), end pos: (1229, 85)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 223</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1226,7 +1226,7 @@ app.logger.error( "Error when attempting to read watermark for document %s: %s", doc_id, e ) - return jsonify({"error": "error when attempting to read watermark"}), 400 + return jsonify({"error": "error when attempting to read watermark"}), 399 inc_watermark_read(method) return jsonify( {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1812"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1812_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1812_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1812_1"><button class="btn btn-outline-success"><span class="job_id">1812 : Job ID 04335e5eda9d4a44b715fe65cfcbf182</span></button></div></a><div aria-labelledby="job_list___sub_heading_1812_1" data-parent="#job_list___sub_accordion_1812" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1812_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1238" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1238, 11), end pos: (1238, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 224</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1235,7 +1235,7 @@ "method": method, "position": position, } - ), 201 + ), 202 def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "")</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 202 == 201 E + where 202 = &lt;WrapperTestResponse 89 bytes [202 ACCEPTED]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 202 == 201 1 failed, 41 passed, 23 warnings in 24.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1813"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1813_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1813_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1813_1"><button class="btn btn-outline-success"><span class="job_id">1813 : Job ID e92f6aea7a634e1189ef57253efcec65</span></button></div></a><div aria-labelledby="job_list___sub_heading_1813_1" data-parent="#job_list___sub_accordion_1813" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1813_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1238" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1238, 11), end pos: (1238, 14)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 225</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1235,7 +1235,7 @@ "method": method, "position": position, } - ), 201 + ), 200 def _is_authorized_metrics_request() -&gt; bool: token_required = os.environ.get("METRICS_TOKEN", "")</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 200 == 201 E + where 200 = &lt;WrapperTestResponse 89 bytes [200 OK]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 200 == 201 1 failed, 41 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1814"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1814_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1814_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1814_1"><button class="btn btn-outline-danger"><span class="job_id">1814 : Job ID a249935a816247f4bf1e040ca0ed61dc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1814_1" data-parent="#job_list___sub_accordion_1814" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1814_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1254" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1254, 52), end pos: (1254, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 226</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1251,7 +1251,7 @@ app.logger.warning( "Unauthorized metrics access attempt from %s", request.remote_addr ) - return jsonify({"error": "not found"}), 404 + return jsonify({"error": "not found"}), 405 data = render_prometheus() return Response(data, mimetype="text/plain; version=0.0.4") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1815"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1815_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1815_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1815_1"><button class="btn btn-outline-danger"><span class="job_id">1815 : Job ID 898a0c83d0ec4b6fb4593516e6f39bf3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1815_1" data-parent="#job_list___sub_accordion_1815" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1815_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1254" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1254, 52), end pos: (1254, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 227</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1251,7 +1251,7 @@ app.logger.warning( "Unauthorized metrics access attempt from %s", request.remote_addr ) - return jsonify({"error": "not found"}), 404 + return jsonify({"error": "not found"}), 403 data = render_prometheus() return Response(data, mimetype="text/plain; version=0.0.4") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1816"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1816_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1816_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1816_1"><button class="btn btn-outline-danger"><span class="job_id">1816 : Job ID e247281d91a7419abe4d71f68549c6c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1816_1" data-parent="#job_list___sub_accordion_1816" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1816_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1265" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1265, 38), end pos: (1265, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 228</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1262,7 +1262,7 @@ app = create_app() if __name__ == "__main__": - port = int(os.environ.get("PORT", 5000)) + port = int(os.environ.get("PORT", 5001)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1") app.run(host=host, port=port)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1817"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1817_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1817_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1817_1"><button class="btn btn-outline-danger"><span class="job_id">1817 : Job ID ed10e8508b044932afd91370ff3326f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1817_1" data-parent="#job_list___sub_accordion_1817" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1817_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1265" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1265, 38), end pos: (1265, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 229</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1262,7 +1262,7 @@ app = create_app() if __name__ == "__main__": - port = int(os.environ.get("PORT", 5000)) + port = int(os.environ.get("PORT", 4999)) # Use localhost by default for security, allow override via environment variable host = os.environ.get("HOST", "127.0.0.1") app.run(host=host, port=port)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1818"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1818_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1818_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1818_1"><button class="btn btn-outline-success"><span class="job_id">1818 : Job ID 30b98f0af559470ebc3c677d5413a801</span></button></div></a><div aria-labelledby="job_list___sub_heading_1818_1" data-parent="#job_list___sub_accordion_1818" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1818_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (99, 8), end pos: (100, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -96,7 +96,6 @@ return jsonify({"error": msg}), code def require_auth(f): - @wraps(f) def wrapper(*args, **kwargs): if app.config['TESTING']: g.user = {"id": 1, "login": "username", "email": "user@email.se"}</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:1261: in &lt;module&gt; app = create_app() ^^^^^^^^^^^^ server.py:414: in create_app @app.get("/api/list-documents") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\sansio\scaffold.py:362: in decorator self.add_url_rule(rule, endpoint, f, **options) C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\sansio\scaffold.py:47: in wrapper_func return f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\sansio\app.py:657: in add_url_rule raise AssertionError( E AssertionError: View function mapping is overwriting an existing endpoint function: wrapper ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T15:06:53+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:06:53+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T15:06:54+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:06:54+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - AssertionError: View function mapping is overwrit... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 8 warnings, 1 error in 13.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1819"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1819_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1819_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1819_1"><button class="btn btn-outline-danger"><span class="job_id">1819 : Job ID 489d718c926949808b9a08bf3d0877fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1819_1" data-parent="#job_list___sub_accordion_1819" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1819_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=135" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (135, 4), end pos: (136, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -130,9 +130,6 @@ for chunk in iter(lambda: f.read(1024 * 1024), b""): h.update(chunk) return h.hexdigest() - - # --- Request instrumentation hooks --- - @app.before_request # type: ignore def _tatou_before(): try: # record start for latency request._tatou_start = time.time() # type: ignore[attr-defined]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1820"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1820_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1820_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1820_1"><button class="btn btn-outline-danger"><span class="job_id">1820 : Job ID d6b107d2fb2641c1881d5302775ecdff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1820_1" data-parent="#job_list___sub_accordion_1820" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1820_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=151" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (151, 4), end pos: (152, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -147,8 +147,6 @@ app.logger.warning("Request size capture failed: %s", exc) except Exception as exc: # pragma: no cover - defensive app.logger.warning("before_request instrumentation failed: %s", exc) - - @app.after_request # type: ignore def _tatou_after(resp): try: start = getattr(request, "_tatou_start", None)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1821"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1821_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1821_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1821_1"><button class="btn btn-outline-success"><span class="job_id">1821 : Job ID 5ed8bf2bb0d74c31b7d4736946f32ef4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1821_1" data-parent="#job_list___sub_accordion_1821" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1821_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=165" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (165, 4), end pos: (166, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -159,10 +159,6 @@ except Exception as exc: # pragma: no cover - defensive app.logger.warning("after_request instrumentation failed: %s", exc) return resp - - # --- Routes --- - - @app.route("/&lt;path:filename&gt;") def static_files(filename): return app.send_static_file(filename) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:232 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:276 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:389 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T112801783960Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:428 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:500 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:547 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:596 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:964 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:389 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T112802656552Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:840 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:232 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1822"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1822_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1822_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1822_1"><button class="btn btn-outline-danger"><span class="job_id">1822 : Job ID fb2050ec5a9a4746b6d7047db4fe4870</span></button></div></a><div aria-labelledby="job_list___sub_heading_1822_1" data-parent="#job_list___sub_accordion_1822" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1822_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=169" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (169, 4), end pos: (170, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -165,8 +165,6 @@ @app.route("/&lt;path:filename&gt;") def static_files(filename): return app.send_static_file(filename) - - @app.route("/") def home(): return app.send_static_file("index.html") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1823"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1823_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1823_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1823_1"><button class="btn btn-outline-success"><span class="job_id">1823 : Job ID ebe8153a84a648bd9dd21459f87d3a8b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1823_1" data-parent="#job_list___sub_accordion_1823" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1823_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=173" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (173, 4), end pos: (174, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -169,8 +169,6 @@ @app.route("/") def home(): return app.send_static_file("index.html") - - @app.get("/healthz") def healthz(): try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">F......................................... [100%] ================================== FAILURES =================================== _____________________________ test_healthz_route ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_healthz_route(client): """Test the health check endpoint.""" resp = client.get("/healthz") &gt; assert resp.status_code == 200 # nosec B101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:60: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_healthz_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1824"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1824_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1824_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1824_1"><button class="btn btn-outline-success"><span class="job_id">1824 : Job ID 72caa8df4bdb46f29e8e544a94eef5b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1824_1" data-parent="#job_list___sub_accordion_1824" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1824_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=197" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (197, 4), end pos: (198, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -192,9 +192,6 @@ if not re.match(r"^[a-zA-Z0-9_-]{3,64}$", login): return False, "Invalid login format" return True, "" - - # POST /api/create-user {email, login, password} - @app.post("/api/create-user") def create_user(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip().lower()</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.FF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:76: AssertionError ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:269 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:390 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170516058600Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:483 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:607 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:969 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:390 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T170516885669Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:847 Document not found or access denied for deletion id=2 _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:245 Failed to add source PDF to database: No users exist to own RMAP base document; create a user first ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 405 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 10 failed, 32 passed, 23 warnings in 20.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1825"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1825_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1825_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1825_1"><button class="btn btn-outline-success"><span class="job_id">1825 : Job ID a6ba04b7d4f5436b938d118e4720b2c9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1825_1" data-parent="#job_list___sub_accordion_1825" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1825_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=242" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (242, 4), end pos: (243, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -237,9 +237,6 @@ return jsonify({"error": "database error"}), 503 return jsonify({"id": row.id, "email": row.email, "login": row.login}), 201 - - # POST /api/login {login, password} - @app.post("/api/login") def login(): payload = request.get_json(silent=True) or {} email = (payload.get("email") or "").strip()</pre></div><div class="alert alert-secondary"><pre class="diff">..F....................................... [100%] ================================== FAILURES =================================== ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:129: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_login_route - assert 405 == 200 1 failed, 41 passed, 23 warnings in 21.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1826"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1826_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1826_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1826_1"><button class="btn btn-outline-success"><span class="job_id">1826 : Job ID 8941e50c87e34aa8b7ffc05a35ac510e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1826_1" data-parent="#job_list___sub_accordion_1826" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1826_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=298" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (298, 4), end pos: (299, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -293,9 +293,6 @@ "expires_in": app.config["TOKEN_TTL_SECONDS"], } ), 200 - - # POST /api/upload-document (multipart/form-data) - @app.post("/api/upload-document") @require_auth def upload_document(): if "file" not in request.files:</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:167: AssertionError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:483 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:607 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:969 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:404: AssertionError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:847 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - assert 405 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 405 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1827"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1827_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1827_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1827_1"><button class="btn btn-outline-success"><span class="job_id">1827 : Job ID 0d62f5cece324f91a8c35ff1fc5563fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1827_1" data-parent="#job_list___sub_accordion_1827" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1827_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (299, 4), end pos: (300, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -296,7 +296,6 @@ # POST /api/upload-document (multipart/form-data) @app.post("/api/upload-document") - @require_auth def upload_document(): if "file" not in request.files: inc_suspicious("upload_missing_file_field")</pre></div><div class="alert alert-secondary"><pre class="diff">...F.F.F.FFF.............................. [100%] ================================== FAILURES =================================== _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } &gt; resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:340: in upload_document user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000001AC1C24A750&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:485 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:609 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:971 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } &gt; upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1167: in post return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:340: in upload_document user_dir = app.config["STORAGE_DIR"] / "files" / g.user["login"] ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000001AC1C64EFC0&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:849 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_upload_document_route - AttributeError: user FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - AttributeError: user FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 6 failed, 36 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1828"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1828_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1828_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1828_1"><button class="btn btn-outline-success"><span class="job_id">1828 : Job ID 67d7dd7b65914e7cb71168f93985f76e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1828_1" data-parent="#job_list___sub_accordion_1828" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1828_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=415" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (415, 4), end pos: (416, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -410,9 +410,6 @@ } inc_upload(int(row.size)) return jsonify(resp_data), 201 - - # GET /api/list-documents - @app.get("/api/list-documents") @require_auth def list_documents(): try:</pre></div><div class="alert alert-secondary"><pre class="diff">....F..................................... [100%] ================================== FAILURES =================================== __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:213: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_documents_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1829"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1829_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1829_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1829_1"><button class="btn btn-outline-success"><span class="job_id">1829 : Job ID a31557ae234e4931a3b80ded3f56c6a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1829_1" data-parent="#job_list___sub_accordion_1829" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1829_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=416" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (416, 4), end pos: (417, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -413,7 +413,6 @@ # GET /api/list-documents @app.get("/api/list-documents") - @require_auth def list_documents(): try: with get_engine().connect() as conn:</pre></div><div class="alert alert-secondary"><pre class="diff">....F..................................... [100%] ================================== FAILURES =================================== __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" &gt; resp = client.get("/api/list-documents") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:432: in list_documents "Database error in list_documents for user=%s", g.user["id"] ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000001DDE26664E0&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_documents_route - AttributeError: user 1 failed, 41 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1830"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1830_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1830_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1830_1"><button class="btn btn-outline-success"><span class="job_id">1830 : Job ID e163b44291324052948d7ff3e603cc0c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1830_1" data-parent="#job_list___sub_accordion_1830" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1830_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=453" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (453, 4), end pos: (454, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -448,9 +448,6 @@ for r in rows ] return jsonify({"documents": docs}), 200 - - # GET /api/list-versions - @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth def list_versions(document_id: int | None = None):</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1831"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1831_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1831_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1831_1"><button class="btn btn-outline-danger"><span class="job_id">1831 : Job ID 15df687cbbe046cfa40cca1c32df8880</span></button></div></a><div aria-labelledby="job_list___sub_heading_1831_1" data-parent="#job_list___sub_accordion_1831" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1831_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=454" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (454, 4), end pos: (455, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -451,7 +451,6 @@ # GET /api/list-versions @app.get("/api/list-versions") - @app.get("/api/list-versions/&lt;int:document_id&gt;") @require_auth def list_versions(document_id: int | None = None): # Input validation</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1832"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1832_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1832_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1832_1"><button class="btn btn-outline-success"><span class="job_id">1832 : Job ID da4300dbf1c64aed87753dbf7c74b370</span></button></div></a><div aria-labelledby="job_list___sub_heading_1832_1" data-parent="#job_list___sub_accordion_1832" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1832_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=455" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (455, 4), end pos: (456, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -452,7 +452,6 @@ # GET /api/list-versions @app.get("/api/list-versions") @app.get("/api/list-versions/&lt;int:document_id&gt;") - @require_auth def list_versions(document_id: int | None = None): # Input validation if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">.....F.................................... [100%] ================================== FAILURES =================================== __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} &gt; resp = client.get("/api/list-versions", query_string = parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:504: in list_versions f"Database error in list_versions: {document_id},{g.user['id']}" ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x0000026FD820AA80&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_versions_route - AttributeError: user 1 failed, 41 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1833"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1833_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1833_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1833_1"><button class="btn btn-outline-success"><span class="job_id">1833 : Job ID 36f58249bee74c6dba40b7b6d2dc3df9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1833_1" data-parent="#job_list___sub_accordion_1833" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1833_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=524" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (524, 4), end pos: (525, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -519,9 +519,6 @@ for r in rows ] return jsonify({"versions": versions}), 200 - - # GET /api/list-all-versions - @app.get("/api/list-all-versions") @require_auth def list_all_versions(): try:</pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:270: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - assert 404 == 200 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1834"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1834_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1834_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1834_1"><button class="btn btn-outline-success"><span class="job_id">1834 : Job ID 5d746e47ef1f4a58b1d471d997200314</span></button></div></a><div aria-labelledby="job_list___sub_heading_1834_1" data-parent="#job_list___sub_accordion_1834" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1834_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=525" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (525, 4), end pos: (526, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -522,7 +522,6 @@ # GET /api/list-all-versions @app.get("/api/list-all-versions") - @require_auth def list_all_versions(): try: # Validate user data from auth token</pre></div><div class="alert alert-secondary"><pre class="diff">......F................................... [100%] ================================== FAILURES =================================== ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters &gt; resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:551: in list_all_versions "Database error in list_all_versions for user=%s", g.user["id"] ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x00000225F1CE6270&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_list_all_versions_route - AttributeError: user 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1835"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1835_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1835_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1835_1"><button class="btn btn-outline-success"><span class="job_id">1835 : Job ID fae1653b88a948d0b70f10a2020dd7b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1835_1" data-parent="#job_list___sub_accordion_1835" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1835_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=570" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (570, 4), end pos: (571, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -565,9 +565,6 @@ for r in rows ] return jsonify({"versions": versions}), 200 - - # GET /api/get-document or /api/get-document/&lt;id&gt;  returns the PDF (inline) - @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None):</pre></div><div class="alert alert-secondary"><pre class="diff">.......F.................................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - assert False 1 failed, 41 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1836"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1836_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1836_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1836_1"><button class="btn btn-outline-danger"><span class="job_id">1836 : Job ID 534d7bf0066e4cbb87eab0012ee55143</span></button></div></a><div aria-labelledby="job_list___sub_heading_1836_1" data-parent="#job_list___sub_accordion_1836" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1836_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=571" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (571, 4), end pos: (572, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -568,7 +568,6 @@ # GET /api/get-document or /api/get-document/&lt;id&gt;  returns the PDF (inline) @app.get("/api/get-document") - @app.get("/api/get-document/&lt;int:document_id&gt;") @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid=</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1837"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1837_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1837_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1837_1"><button class="btn btn-outline-success"><span class="job_id">1837 : Job ID 7603f730a3174e55b807c0904b04d59e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1837_1" data-parent="#job_list___sub_accordion_1837" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1837_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=572" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (572, 4), end pos: (573, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -569,7 +569,6 @@ # GET /api/get-document or /api/get-document/&lt;id&gt;  returns the PDF (inline) @app.get("/api/get-document") @app.get("/api/get-document/&lt;int:document_id&gt;") - @require_auth def get_document(document_id: int | None = None): # Support both path param and ?id=/ ?documentid= if document_id is None:</pre></div><div class="alert alert-secondary"><pre class="diff">.......F...F.............................. [100%] ================================== FAILURES =================================== ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} &gt; resp = client.get("/api/get-document", query_string=parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:600: in get_document f"Database error in get_document: {document_id},{g.user['id']}" ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000001CC19F66900&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") assert resp.status_code == 200 #Test file is deleted &gt; resp_deletion = client.get("/api/get-document/2") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:459: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:600: in get_document f"Database error in get_document: {document_id},{g.user['id']}" ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000001CC1A1ABB00&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_document_route - AttributeError: user FAILED ..\test\test_api.py::test_delete_document_route - AttributeError: user 2 failed, 40 passed, 23 warnings in 21.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1838"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1838_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1838_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1838_1"><button class="btn btn-outline-success"><span class="job_id">1838 : Job ID 1d9d760c3e6043a6a7963a38d73730b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_1838_1" data-parent="#job_list___sub_accordion_1838" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1838_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=693" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (693, 4), end pos: (694, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -688,9 +688,6 @@ "Error serving file for document id=%s: %s", document_id, e ) return jsonify({"error": "error serving file"}), 500 - - # GET /api/get-version/&lt;link&gt;  returns the watermarked PDF (inline) - @app.get("/api/get-version/&lt;link&gt;") def get_version(link: str): # Accept both 32-char (RMAP session secrets) and 64-char (SHA-256 style) tokens if not re.fullmatch(r"[0-9a-f]{32}|[0-9a-f]{64}", link):</pre></div><div class="alert alert-secondary"><pre class="diff">..............F........................... [100%] ================================== FAILURES =================================== ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; shared_link = {'version_link': '0000000000bc614e7126f22764368e5b'} def test_get_version_route(client, shared_link): route = "/api/get-version/" + shared_link.get("version_link").strip() resp = client.get(route) # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:613: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_version_route - assert False 1 failed, 41 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1839"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1839_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1839_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1839_1"><button class="btn btn-outline-success"><span class="job_id">1839 : Job ID 6aa3fe511a9d411e81b9a6aa65200f46</span></button></div></a><div aria-labelledby="job_list___sub_heading_1839_1" data-parent="#job_list___sub_accordion_1839" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1839_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=801" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (801, 4), end pos: (802, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -796,9 +796,6 @@ f"path {fp} escapes storage root {storage_root}" ) from None return fp - - # DELETE /api/delete-document (and variants) POST supported for convenience - @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth def delete_document(document_id: int | None = None):</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:457: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - assert 405 == 200 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1840"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1840_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1840_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1840_1"><button class="btn btn-outline-danger"><span class="job_id">1840 : Job ID d20a43effdb644068e29d852753ea8f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1840_1" data-parent="#job_list___sub_accordion_1840" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1840_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=802" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (802, 4), end pos: (803, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -799,7 +799,6 @@ # DELETE /api/delete-document (and variants) POST supported for convenience @app.route("/api/delete-document", methods=["DELETE", "POST"]) - @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) @require_auth def delete_document(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1841"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1841_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1841_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1841_1"><button class="btn btn-outline-success"><span class="job_id">1841 : Job ID ee9667afcfb9453597501b550ec0a3b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1841_1" data-parent="#job_list___sub_accordion_1841" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1841_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=803" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (803, 4), end pos: (804, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -800,7 +800,6 @@ # DELETE /api/delete-document (and variants) POST supported for convenience @app.route("/api/delete-document", methods=["DELETE", "POST"]) @app.route("/api/delete-document/&lt;document_id&gt;", methods=["DELETE"]) - @require_auth def delete_document(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if document_id in (None, ""):</pre></div><div class="alert alert-secondary"><pre class="diff">...........F.............................. [100%] ================================== FAILURES =================================== _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} &gt; resp = client.delete("/api/delete-document", json=document_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:454: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1177: in delete return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server.py:826: in delete_document owner_id = int(g.user["id"]) ^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;flask.ctx._AppCtxGlobals object at 0x000002999FF907A0&gt;, name = 'user' def __getattr__(self, name: str) -&gt; t.Any: try: return self.__dict__[name] except KeyError: &gt; raise AttributeError(name) from None E AttributeError: user C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\ctx.py:56: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_delete_document_route - AttributeError: user 1 failed, 41 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1842"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1842_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1842_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1842_1"><button class="btn btn-outline-success"><span class="job_id">1842 : Job ID e8c6dd6a6c56426f9f4227f2879c4f9b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1842_1" data-parent="#job_list___sub_accordion_1842" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1842_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=906" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (906, 4), end pos: (907, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -900,10 +900,6 @@ "note": delete_error, # null/omitted if everything was fine } ), 200 - - # POST /api/create-watermark or /api/create-watermark/&lt;id&gt; - #  create watermarked pdf and returns metadata - @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None):</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:337: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 405 == 201 1 failed, 41 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1843"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1843_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1843_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1843_1"><button class="btn btn-outline-danger"><span class="job_id">1843 : Job ID 942d883beda34976baddb25000ddae95</span></button></div></a><div aria-labelledby="job_list___sub_heading_1843_1" data-parent="#job_list___sub_accordion_1843" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1843_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=907" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (907, 4), end pos: (908, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -904,7 +904,6 @@ # POST /api/create-watermark or /api/create-watermark/&lt;id&gt; #  create watermarked pdf and returns metadata @app.post("/api/create-watermark") - @app.post("/api/create-watermark/&lt;int:document_id&gt;") @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1844"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1844_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1844_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1844_1"><button class="btn btn-outline-success"><span class="job_id">1844 : Job ID 4d2dce7870a845fb94beab7a3a7738fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1844_1" data-parent="#job_list___sub_accordion_1844" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1844_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=908" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (908, 4), end pos: (909, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -905,7 +905,6 @@ #  create watermarked pdf and returns metadata @app.post("/api/create-watermark") @app.post("/api/create-watermark/&lt;int:document_id&gt;") - @require_auth def create_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on GET if not document_id:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F................................ [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:967 Database error fetching document user ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1845"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1845_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1845_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1845_1"><button class="btn btn-outline-success"><span class="job_id">1845 : Job ID 268d3ffe06d941bfa759b6f6c3652422</span></button></div></a><div aria-labelledby="job_list___sub_heading_1845_1" data-parent="#job_list___sub_accordion_1845" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1845_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1131" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1131, 4), end pos: (1132, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1125,10 +1125,6 @@ "size": len(wm_bytes), } ), 201 - - # GET /api/get-watermarking-methods - #  {"methods":[{"name":..., "description":...}, ...], "count":N} - @app.get("/api/get-watermarking-methods") def get_watermarking_methods(): methods = [] </pre></div><div class="alert alert-secondary"><pre class="diff">........F................................. [100%] ================================== FAILURES =================================== _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" resp = client.get("/api/get-watermarking-methods") data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:316: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_watermarking_methods_route - assert 404 ... 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1846"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1846_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1846_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1846_1"><button class="btn btn-outline-success"><span class="job_id">1846 : Job ID f59f16fc9bd44c91a3725aacda0cbff5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1846_1" data-parent="#job_list___sub_accordion_1846" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1846_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1143" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1143, 4), end pos: (1144, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1138,9 +1138,6 @@ ) return jsonify({"methods": methods, "count": len(methods)}), 200 - - # POST /api/read-watermark - @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth def read_watermark(document_id: int | None = None):</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 405 == 201 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:415: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 405 == 201 1 failed, 41 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1847"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1847_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1847_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1847_1"><button class="btn btn-outline-danger"><span class="job_id">1847 : Job ID 078764e1ce014cbf9d6f20bd0af90f67</span></button></div></a><div aria-labelledby="job_list___sub_heading_1847_1" data-parent="#job_list___sub_accordion_1847" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1847_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1144" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1144, 4), end pos: (1145, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1141,7 +1141,6 @@ # POST /api/read-watermark @app.post("/api/read-watermark") - @app.post("/api/read-watermark/&lt;int:document_id&gt;") @require_auth def read_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1848"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1848_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1848_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1848_1"><button class="btn btn-outline-success"><span class="job_id">1848 : Job ID a4fa5c533ff14d53abd1d327c97fc25a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1848_1" data-parent="#job_list___sub_accordion_1848" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1848_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1145" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1145, 4), end pos: (1146, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1142,7 +1142,6 @@ # POST /api/read-watermark @app.post("/api/read-watermark") @app.post("/api/read-watermark/&lt;int:document_id&gt;") - @require_auth def read_watermark(document_id: int | None = None): # accept id from path, query (?id= / ?documentid=), or JSON body on POST if not document_id:</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1195 Database error fetching document 2 for watermark read: user ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1849"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1849_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1849_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1849_1"><button class="btn btn-outline-danger"><span class="job_id">1849 : Job ID a87458ed776044a09b9d4a4496b918cf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1849_1" data-parent="#job_list___sub_accordion_1849" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1849_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1247" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1247, 4), end pos: (1248, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1243,8 +1243,6 @@ if provided != token_required: return False return True - - @app.get("/metrics") def metrics(): if not _is_authorized_metrics_request(): # Obscure existence a bit  return 404 instead of 403 to casual scans</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1850"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1850_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1850_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1850_1"><button class="btn btn-outline-danger"><span class="job_id">1850 : Job ID ad99f2bab35f4b8b86bcc8fb59d826c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1850_1" data-parent="#job_list___sub_accordion_1850" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1850_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=130" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (130, 25), end pos: (130, 63)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -127,7 +127,7 @@ def _sha256_file(path: Path) -&gt; str: h = hashlib.sha256() with path.open("rb") as f: - for chunk in iter(lambda: f.read(1024 * 1024), b""): + for chunk in []: h.update(chunk) return h.hexdigest() </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1851"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1851_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1851_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1851_1"><button class="btn btn-outline-danger"><span class="job_id">1851 : Job ID d3f1deeea40746129c9e1caeac664a0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1851_1" data-parent="#job_list___sub_accordion_1851" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1851_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=server.py&amp;line=1135" class="text-secondary"><button class="btn btn-outline-dark">server.py, start pos: (1135, 17), end pos: (1135, 32)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- aserver.py +++ bserver.py @@ -1132,7 +1132,7 @@ def get_watermarking_methods(): methods = [] - for m in WMUtils.METHODS: + for m in []: methods.append( {"name": m, "description": WMUtils.get_method(m).get_usage()} )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1852"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1852_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1852_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1852_1"><button class="btn btn-outline-danger"><span class="job_id">1852 : Job ID 22e13a5bf4b64a9cb5a7d0f8d18d6dd6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1852_1" data-parent="#job_list___sub_accordion_1852" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1852_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str + WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1853"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1853_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1853_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1853_1"><button class="btn btn-outline-danger"><span class="job_id">1853 : Job ID dea9bd1f19b645a3ab3ff3e2f0e2f723</span></button></div></a><div aria-labelledby="job_list___sub_heading_1853_1" data-parent="#job_list___sub_accordion_1853" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1853_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str + WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1854"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1854_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1854_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1854_1"><button class="btn btn-outline-danger"><span class="job_id">1854 : Job ID b8f2c11bc80a4c8a9058be6f4bafcaeb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1854_1" data-parent="#job_list___sub_accordion_1854" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1854_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str + None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1855"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1855_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1855_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1855_1"><button class="btn btn-outline-danger"><span class="job_id">1855 : Job ID 6ade1af9dc0e4dc185aa12cc85a910ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1855_1" data-parent="#job_list___sub_accordion_1855" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1855_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str + None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.47s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1856"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1856_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1856_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1856_1"><button class="btn btn-outline-danger"><span class="job_id">1856 : Job ID 332759e050ab4326a12f4c5285f188fa</span></button></div></a><div aria-labelledby="job_list___sub_heading_1856_1" data-parent="#job_list___sub_accordion_1856" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1856_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str + WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1857"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1857_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1857_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1857_1"><button class="btn btn-outline-danger"><span class="job_id">1857 : Job ID f79c245965b5451e85e9b9bb62daeba8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1857_1" data-parent="#job_list___sub_accordion_1857" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1857_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str + None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1858"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1858_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1858_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1858_1"><button class="btn btn-outline-danger"><span class="job_id">1858 : Job ID 435c8880f9204276b69e9731d34bec43</span></button></div></a><div aria-labelledby="job_list___sub_heading_1858_1" data-parent="#job_list___sub_accordion_1858" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1858_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str + WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1859"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1859_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1859_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1859_1"><button class="btn btn-outline-danger"><span class="job_id">1859 : Job ID 26be429562a048e09a9a321ee91de69f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1859_1" data-parent="#job_list___sub_accordion_1859" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1859_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str - WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1860"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1860_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1860_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1860_1"><button class="btn btn-outline-danger"><span class="job_id">1860 : Job ID 6e7730a825864ac48d84354e917ab09f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1860_1" data-parent="#job_list___sub_accordion_1860" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1860_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str - WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1861"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1861_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1861_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1861_1"><button class="btn btn-outline-danger"><span class="job_id">1861 : Job ID 101401350d3f47069e6b5faaf5aa7960</span></button></div></a><div aria-labelledby="job_list___sub_heading_1861_1" data-parent="#job_list___sub_accordion_1861" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1861_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str - None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1862"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1862_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1862_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1862_1"><button class="btn btn-outline-danger"><span class="job_id">1862 : Job ID 8321d6001e0440ae99e12f7b223187c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1862_1" data-parent="#job_list___sub_accordion_1862" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1862_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str - None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1863"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1863_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1863_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1863_1"><button class="btn btn-outline-success"><span class="job_id">1863 : Job ID 679f0bc3a7674c87aab59da472a3add7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1863_1" data-parent="#job_list___sub_accordion_1863" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1863_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str - WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125014434123Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T125015276487Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1864"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1864_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1864_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1864_1"><button class="btn btn-outline-danger"><span class="job_id">1864 : Job ID 04aac6b88513412087353abd3c8e83de</span></button></div></a><div aria-labelledby="job_list___sub_heading_1864_1" data-parent="#job_list___sub_accordion_1864" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1864_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str - None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1865"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1865_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1865_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1865_1"><button class="btn btn-outline-success"><span class="job_id">1865 : Job ID c10f429037e8459caa21bbcd6bd5023b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1865_1" data-parent="#job_list___sub_accordion_1865" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1865_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str - WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105937734865Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T105938580397Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1866"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1866_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1866_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1866_1"><button class="btn btn-outline-danger"><span class="job_id">1866 : Job ID 76075d0a597a45f9932a17fe86852247</span></button></div></a><div aria-labelledby="job_list___sub_heading_1866_1" data-parent="#job_list___sub_accordion_1866" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1866_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str * WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1867"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1867_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1867_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1867_1"><button class="btn btn-outline-danger"><span class="job_id">1867 : Job ID 24e5053fc9a848d793d55b6b66e30d82</span></button></div></a><div aria-labelledby="job_list___sub_heading_1867_1" data-parent="#job_list___sub_accordion_1867" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1867_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str * WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1868"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1868_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1868_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1868_1"><button class="btn btn-outline-danger"><span class="job_id">1868 : Job ID f84b2a7ff0be4032920a037dd96d909b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1868_1" data-parent="#job_list___sub_accordion_1868" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1868_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str * None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1869"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1869_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1869_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1869_1"><button class="btn btn-outline-danger"><span class="job_id">1869 : Job ID 4509f6ad3e784a1f99b4451cbe447593</span></button></div></a><div aria-labelledby="job_list___sub_heading_1869_1" data-parent="#job_list___sub_accordion_1869" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1869_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str * None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1870"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1870_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1870_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1870_1"><button class="btn btn-outline-danger"><span class="job_id">1870 : Job ID 7ef259ffa6704003ad77225af28fdf58</span></button></div></a><div aria-labelledby="job_list___sub_heading_1870_1" data-parent="#job_list___sub_accordion_1870" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1870_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str * WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1871"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1871_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1871_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1871_1"><button class="btn btn-outline-danger"><span class="job_id">1871 : Job ID ce1fc4d59fb047abb86c214e3e003913</span></button></div></a><div aria-labelledby="job_list___sub_heading_1871_1" data-parent="#job_list___sub_accordion_1871" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1871_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str * None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1872"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1872_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1872_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1872_1"><button class="btn btn-outline-danger"><span class="job_id">1872 : Job ID 80be1f2b019b45fa9717bca897d4f661</span></button></div></a><div aria-labelledby="job_list___sub_heading_1872_1" data-parent="#job_list___sub_accordion_1872" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1872_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str * WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1873"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1873_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1873_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1873_1"><button class="btn btn-outline-danger"><span class="job_id">1873 : Job ID 7fb58016969140579bce3698b17a5e4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1873_1" data-parent="#job_list___sub_accordion_1873" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1873_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str / WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1874"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1874_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1874_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1874_1"><button class="btn btn-outline-danger"><span class="job_id">1874 : Job ID 337b35563e3d49c087b9fca500d281cd</span></button></div></a><div aria-labelledby="job_list___sub_heading_1874_1" data-parent="#job_list___sub_accordion_1874" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1874_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str / WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1875"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1875_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1875_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1875_1"><button class="btn btn-outline-danger"><span class="job_id">1875 : Job ID 0c3c83fa91d64a078965a8dbbe69a30a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1875_1" data-parent="#job_list___sub_accordion_1875" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1875_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str / None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1876"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1876_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1876_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1876_1"><button class="btn btn-outline-danger"><span class="job_id">1876 : Job ID 8baddbfaab4f44c6995610f062f82e75</span></button></div></a><div aria-labelledby="job_list___sub_heading_1876_1" data-parent="#job_list___sub_accordion_1876" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1876_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str / None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1877"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1877_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1877_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1877_1"><button class="btn btn-outline-danger"><span class="job_id">1877 : Job ID 3883765680af4884a1b69abd206d887a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1877_1" data-parent="#job_list___sub_accordion_1877" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1877_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str / WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1878"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1878_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1878_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1878_1"><button class="btn btn-outline-danger"><span class="job_id">1878 : Job ID dfec39dc51784dde9d3d0f2789d4a4b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1878_1" data-parent="#job_list___sub_accordion_1878" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1878_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str / None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1879"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1879_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1879_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1879_1"><button class="btn btn-outline-success"><span class="job_id">1879 : Job ID 894810530bd846d590e10042a330b90e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1879_1" data-parent="#job_list___sub_accordion_1879" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1879_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str / WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T205717372640Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T205718378235Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 22.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1880"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1880_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1880_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1880_1"><button class="btn btn-outline-danger"><span class="job_id">1880 : Job ID d954a146f02f46c2ad6a1527df01e88a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1880_1" data-parent="#job_list___sub_accordion_1880" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1880_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str // WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1881"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1881_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1881_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1881_1"><button class="btn btn-outline-danger"><span class="job_id">1881 : Job ID 243a04d5e39242c8b91e2d878563f4f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1881_1" data-parent="#job_list___sub_accordion_1881" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1881_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str // WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1882"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1882_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1882_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1882_1"><button class="btn btn-outline-danger"><span class="job_id">1882 : Job ID e2145ef3db0f4d4faf1a29748c3e14c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_1882_1" data-parent="#job_list___sub_accordion_1882" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1882_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str // None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1883"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1883_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1883_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1883_1"><button class="btn btn-outline-danger"><span class="job_id">1883 : Job ID 3f72a3524b5e4961a218ecb67c8050de</span></button></div></a><div aria-labelledby="job_list___sub_heading_1883_1" data-parent="#job_list___sub_accordion_1883" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1883_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str // None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1884"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1884_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1884_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1884_1"><button class="btn btn-outline-danger"><span class="job_id">1884 : Job ID caeaea1155e6426087dfc9c5a19c8eb0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1884_1" data-parent="#job_list___sub_accordion_1884" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1884_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str // WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1885"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1885_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1885_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1885_1"><button class="btn btn-outline-danger"><span class="job_id">1885 : Job ID 1fcfd17d186448219aa9a33818cd1d8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1885_1" data-parent="#job_list___sub_accordion_1885" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1885_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str // None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1886"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1886_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1886_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1886_1"><button class="btn btn-outline-danger"><span class="job_id">1886 : Job ID ecafbf8c9fef40598c88cb1e324501ee</span></button></div></a><div aria-labelledby="job_list___sub_heading_1886_1" data-parent="#job_list___sub_accordion_1886" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1886_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str // WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1887"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1887_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1887_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1887_1"><button class="btn btn-outline-danger"><span class="job_id">1887 : Job ID 2b580b40921147dabde246a0da07684d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1887_1" data-parent="#job_list___sub_accordion_1887" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1887_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str % WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1888"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1888_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1888_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1888_1"><button class="btn btn-outline-danger"><span class="job_id">1888 : Job ID d9d37b2a6fc24edeafbfdc171d6233c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1888_1" data-parent="#job_list___sub_accordion_1888" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1888_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str % WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1889"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1889_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1889_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1889_1"><button class="btn btn-outline-danger"><span class="job_id">1889 : Job ID 827190e7e1d04cb7bbef583107b45b98</span></button></div></a><div aria-labelledby="job_list___sub_heading_1889_1" data-parent="#job_list___sub_accordion_1889" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1889_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str % None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1890"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1890_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1890_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1890_1"><button class="btn btn-outline-danger"><span class="job_id">1890 : Job ID 5979f0eba50d412682716ee6005f0853</span></button></div></a><div aria-labelledby="job_list___sub_heading_1890_1" data-parent="#job_list___sub_accordion_1890" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1890_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str % None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1891"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1891_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1891_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1891_1"><button class="btn btn-outline-danger"><span class="job_id">1891 : Job ID 103fa27d65fc415c81ac4d0c7946cc56</span></button></div></a><div aria-labelledby="job_list___sub_heading_1891_1" data-parent="#job_list___sub_accordion_1891" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1891_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str % WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1892"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1892_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1892_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1892_1"><button class="btn btn-outline-danger"><span class="job_id">1892 : Job ID 1bfc8ca229c04a6dabd2ef2bbf974958</span></button></div></a><div aria-labelledby="job_list___sub_heading_1892_1" data-parent="#job_list___sub_accordion_1892" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1892_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str % None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1893"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1893_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1893_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1893_1"><button class="btn btn-outline-danger"><span class="job_id">1893 : Job ID d9bdb97eb0304f32b13fc309abe08354</span></button></div></a><div aria-labelledby="job_list___sub_heading_1893_1" data-parent="#job_list___sub_accordion_1893" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1893_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str % WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1894"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1894_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1894_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1894_1"><button class="btn btn-outline-danger"><span class="job_id">1894 : Job ID 5158add8ce0047608f68b5c4172866de</span></button></div></a><div aria-labelledby="job_list___sub_heading_1894_1" data-parent="#job_list___sub_accordion_1894" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1894_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str ** WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1895"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1895_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1895_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1895_1"><button class="btn btn-outline-danger"><span class="job_id">1895 : Job ID a94c2915a2b44661a56c8d089c8efc3a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1895_1" data-parent="#job_list___sub_accordion_1895" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1895_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str ** WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1896"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1896_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1896_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1896_1"><button class="btn btn-outline-danger"><span class="job_id">1896 : Job ID 545299de0e1041ed82914ad9d4fc1eac</span></button></div></a><div aria-labelledby="job_list___sub_heading_1896_1" data-parent="#job_list___sub_accordion_1896" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1896_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ** None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1897"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1897_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1897_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1897_1"><button class="btn btn-outline-danger"><span class="job_id">1897 : Job ID 0a027885991544ca8967e111c3b81cc7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1897_1" data-parent="#job_list___sub_accordion_1897" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1897_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ** None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1898"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1898_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1898_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1898_1"><button class="btn btn-outline-danger"><span class="job_id">1898 : Job ID e2f2d7557b3a4af393b014421f283b18</span></button></div></a><div aria-labelledby="job_list___sub_heading_1898_1" data-parent="#job_list___sub_accordion_1898" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1898_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str ** WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1899"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1899_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1899_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1899_1"><button class="btn btn-outline-danger"><span class="job_id">1899 : Job ID cc5686abb2c94b1fbdd79f4a75829a3b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1899_1" data-parent="#job_list___sub_accordion_1899" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1899_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str ** None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1900"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1900_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1900_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1900_1"><button class="btn btn-outline-danger"><span class="job_id">1900 : Job ID fb5cfe5ceccc4d6b871aada25031f9f5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1900_1" data-parent="#job_list___sub_accordion_1900" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1900_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str ** WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1901"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1901_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1901_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1901_1"><button class="btn btn-outline-danger"><span class="job_id">1901 : Job ID cb74889bc7e1462d85f6e79764206725</span></button></div></a><div aria-labelledby="job_list___sub_heading_1901_1" data-parent="#job_list___sub_accordion_1901" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1901_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str &gt;&gt; WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1902"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1902_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1902_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1902_1"><button class="btn btn-outline-danger"><span class="job_id">1902 : Job ID e21dc4e7bea94366b681f780a2fcf56d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1902_1" data-parent="#job_list___sub_accordion_1902" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1902_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str &gt;&gt; WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1903"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1903_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1903_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1903_1"><button class="btn btn-outline-danger"><span class="job_id">1903 : Job ID 874062b5f8c84a9db1593cbbe3c5b509</span></button></div></a><div aria-labelledby="job_list___sub_heading_1903_1" data-parent="#job_list___sub_accordion_1903" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1903_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &gt;&gt; None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1904"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1904_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1904_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1904_1"><button class="btn btn-outline-danger"><span class="job_id">1904 : Job ID ffdd663930cb43b38b382055f271e31e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1904_1" data-parent="#job_list___sub_accordion_1904" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1904_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1905"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1905_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1905_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1905_1"><button class="btn btn-outline-danger"><span class="job_id">1905 : Job ID 95ddc02ef6c14fdab3f559b4f3cb4782</span></button></div></a><div aria-labelledby="job_list___sub_heading_1905_1" data-parent="#job_list___sub_accordion_1905" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1905_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str &gt;&gt; WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1906"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1906_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1906_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1906_1"><button class="btn btn-outline-danger"><span class="job_id">1906 : Job ID dbd03d825f654409aeae1b315413e09a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1906_1" data-parent="#job_list___sub_accordion_1906" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1906_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1907"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1907_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1907_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1907_1"><button class="btn btn-outline-danger"><span class="job_id">1907 : Job ID 6babf5908bfa494580b74f983d8e3c34</span></button></div></a><div aria-labelledby="job_list___sub_heading_1907_1" data-parent="#job_list___sub_accordion_1907" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1907_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str &gt;&gt; WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1908"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1908_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1908_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1908_1"><button class="btn btn-outline-danger"><span class="job_id">1908 : Job ID fa65ce788e1f4e5fa2e61acdf0035003</span></button></div></a><div aria-labelledby="job_list___sub_heading_1908_1" data-parent="#job_list___sub_accordion_1908" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1908_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str &lt;&lt; WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1909"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1909_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1909_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1909_1"><button class="btn btn-outline-danger"><span class="job_id">1909 : Job ID 08209681735f4af98b5cdb8af8925203</span></button></div></a><div aria-labelledby="job_list___sub_heading_1909_1" data-parent="#job_list___sub_accordion_1909" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1909_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str &lt;&lt; WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1910"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1910_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1910_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1910_1"><button class="btn btn-outline-danger"><span class="job_id">1910 : Job ID 19ca397c9a944a40b6fde6a3eb612c67</span></button></div></a><div aria-labelledby="job_list___sub_heading_1910_1" data-parent="#job_list___sub_accordion_1910" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1910_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &lt;&lt; None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1911"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1911_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1911_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1911_1"><button class="btn btn-outline-danger"><span class="job_id">1911 : Job ID b8e49a326bb145a09e8e8a531b308a1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1911_1" data-parent="#job_list___sub_accordion_1911" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1911_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1912"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1912_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1912_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1912_1"><button class="btn btn-outline-danger"><span class="job_id">1912 : Job ID 75b79a249b1c4030a7968873e18c0a14</span></button></div></a><div aria-labelledby="job_list___sub_heading_1912_1" data-parent="#job_list___sub_accordion_1912" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1912_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str &lt;&lt; WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1913"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1913_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1913_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1913_1"><button class="btn btn-outline-danger"><span class="job_id">1913 : Job ID 8698a7cab2aa4f2f8c5aa167e3ed92b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_1913_1" data-parent="#job_list___sub_accordion_1913" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1913_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1914"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1914_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1914_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1914_1"><button class="btn btn-outline-success"><span class="job_id">1914 : Job ID 787955b5d5944ca3b195b4ff25734a55</span></button></div></a><div aria-labelledby="job_list___sub_heading_1914_1" data-parent="#job_list___sub_accordion_1914" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1914_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str &lt;&lt; WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T151018866502Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T151019754978Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1915"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1915_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1915_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1915_1"><button class="btn btn-outline-danger"><span class="job_id">1915 : Job ID 15a52023ac664cc9b0454d2de0da686a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1915_1" data-parent="#job_list___sub_accordion_1915" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1915_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str &amp; WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1916"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1916_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1916_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1916_1"><button class="btn btn-outline-danger"><span class="job_id">1916 : Job ID 5af5054ddd5a413eaa3e6ec9aa792237</span></button></div></a><div aria-labelledby="job_list___sub_heading_1916_1" data-parent="#job_list___sub_accordion_1916" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1916_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str &amp; WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1917"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1917_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1917_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1917_1"><button class="btn btn-outline-danger"><span class="job_id">1917 : Job ID 9dea29d031b648caaf9fd551668f07d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1917_1" data-parent="#job_list___sub_accordion_1917" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1917_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &amp; None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1918"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1918_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1918_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1918_1"><button class="btn btn-outline-danger"><span class="job_id">1918 : Job ID 1ab8c188738a4500b7c9efe5d8eac979</span></button></div></a><div aria-labelledby="job_list___sub_heading_1918_1" data-parent="#job_list___sub_accordion_1918" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1918_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1919"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1919_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1919_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1919_1"><button class="btn btn-outline-danger"><span class="job_id">1919 : Job ID 2cf6c75995d147e3b824e41769e17850</span></button></div></a><div aria-labelledby="job_list___sub_heading_1919_1" data-parent="#job_list___sub_accordion_1919" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1919_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str &amp; WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1920"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1920_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1920_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1920_1"><button class="btn btn-outline-danger"><span class="job_id">1920 : Job ID 69f0764e0878459aae0e0155a2720a1b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1920_1" data-parent="#job_list___sub_accordion_1920" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1920_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1921"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1921_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1921_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1921_1"><button class="btn btn-outline-danger"><span class="job_id">1921 : Job ID 58ac4a1a1da844ba8c108b3165c132e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1921_1" data-parent="#job_list___sub_accordion_1921" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1921_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str &amp; WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1922"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1922_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1922_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1922_1"><button class="btn btn-outline-success"><span class="job_id">1922 : Job ID 7bb91dc5e698443ebb479bad964bf366</span></button></div></a><div aria-labelledby="job_list___sub_heading_1922_1" data-parent="#job_list___sub_accordion_1922" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1922_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=68" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (68, 27), end pos: (68, 28)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -65,7 +65,7 @@ METHODS[method.name] = method -def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: +def get_method(method: str ^ WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220837914653Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T220838760058Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1923"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1923_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1923_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1923_1"><button class="btn btn-outline-danger"><span class="job_id">1923 : Job ID ee8c76fd61df480a9237133c6b5d485f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1923_1" data-parent="#job_list___sub_accordion_1923" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1923_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (92, 16), end pos: (92, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -89,7 +89,7 @@ def apply_watermark( - method: str | WatermarkingMethod, + method: str ^ WatermarkingMethod, pdf: PdfSource, secret: str, key: str,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1924"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1924_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1924_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1924_1"><button class="btn btn-outline-danger"><span class="job_id">1924 : Job ID 8998c8f009d54e08909fb061df5b5bea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1924_1" data-parent="#job_list___sub_accordion_1924" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1924_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=96" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (96, 22), end pos: (96, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -93,7 +93,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ^ None = None, position: str | None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes."""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1925"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1925_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1925_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1925_1"><button class="btn btn-outline-danger"><span class="job_id">1925 : Job ID 9a9f1a1fd1b945b4a61513804ef3b55a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1925_1" data-parent="#job_list___sub_accordion_1925" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1925_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (97, 18), end pos: (97, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -94,7 +94,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ^ None = None, ) -&gt; bytes: """Apply a watermark using the specified method and return new PDF bytes.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1926"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1926_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1926_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1926_1"><button class="btn btn-outline-danger"><span class="job_id">1926 : Job ID 24ef89b18bfe427b873d46baa8bc0f1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1926_1" data-parent="#job_list___sub_accordion_1926" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1926_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (107, 16), end pos: (107, 17)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -104,7 +104,7 @@ def is_watermarking_applicable( - method: str | WatermarkingMethod, + method: str ^ WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1927"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1927_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1927_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1927_1"><button class="btn btn-outline-success"><span class="job_id">1927 : Job ID 428b3052e35e4c3293f4208b25b35b70</span></button></div></a><div aria-labelledby="job_list___sub_heading_1927_1" data-parent="#job_list___sub_accordion_1927" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1927_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=109" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (109, 18), end pos: (109, 19)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -106,7 +106,7 @@ def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, - position: str | None = None, + position: str ^ None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103712357982Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103713231743Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1928"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1928_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1928_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1928_1"><button class="btn btn-outline-danger"><span class="job_id">1928 : Job ID 1479bc73eef34361aaa9204ac5e20637</span></button></div></a><div aria-labelledby="job_list___sub_heading_1928_1" data-parent="#job_list___sub_accordion_1928" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1928_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=116" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (116, 31), end pos: (116, 32)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -113,7 +113,7 @@ return m.is_watermark_applicable(pdf=pdf, position=position) -def read_watermark(method: str | WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: +def read_watermark(method: str ^ WatermarkingMethod, pdf: PdfSource, key: str) -&gt; str: """Recover a secret from ``pdf`` using the specified method.""" m = get_method(method) return m.read_secret(pdf=pdf, key=key)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1929"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1929_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1929_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1929_1"><button class="btn btn-outline-danger"><span class="job_id">1929 : Job ID a9e9902e7bde4789ac8da59d6851af7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1929_1" data-parent="#job_list___sub_accordion_1929" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1929_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") != "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1930"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1930_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1930_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1930_1"><button class="btn btn-outline-danger"><span class="job_id">1930 : Job ID 68d767456172482f90c65450d2d1710c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1930_1" data-parent="#job_list___sub_accordion_1930" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1930_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") &lt; "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1931"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1931_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1931_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1931_1"><button class="btn btn-outline-danger"><span class="job_id">1931 : Job ID c0f25e896efd47de885e473332358a0f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1931_1" data-parent="#job_list___sub_accordion_1931" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1931_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") &lt;= "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1932"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1932_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1932_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1932_1"><button class="btn btn-outline-danger"><span class="job_id">1932 : Job ID 375bd0a9b1b449e6bb50a1ad55e6a668</span></button></div></a><div aria-labelledby="job_list___sub_heading_1932_1" data-parent="#job_list___sub_accordion_1932" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1932_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") &gt; "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1933"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1933_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1933_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1933_1"><button class="btn btn-outline-danger"><span class="job_id">1933 : Job ID b9640ef5e7384940b369be805ea99df0</span></button></div></a><div aria-labelledby="job_list___sub_heading_1933_1" data-parent="#job_list___sub_accordion_1933" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1933_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") &gt;= "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1934"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1934_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1934_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1934_1"><button class="btn btn-outline-danger"><span class="job_id">1934 : Job ID 4d487c3c50a94995853a50dc30cfe980</span></button></div></a><div aria-labelledby="job_list___sub_heading_1934_1" data-parent="#job_list___sub_accordion_1934" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1934_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") is "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr watermarking_utils.py:232 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\watermarking_utils.py:232: SyntaxWarning: "is" with 'str' literal. Did you mean "=="? page_nodes = [c for c in children if c.get("type") is "Page"] &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1935"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1935_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1935_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1935_1"><button class="btn btn-outline-danger"><span class="job_id">1935 : Job ID e24fe01b1fc4404d9ccd5dc64dff6430</span></button></div></a><div aria-labelledby="job_list___sub_heading_1935_1" data-parent="#job_list___sub_accordion_1935" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1935_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=232" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (232, 55), end pos: (232, 57)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -229,7 +229,7 @@ children.append(node) # Also derive simple page nodes by searching for '/Type /Page' - page_nodes = [c for c in children if c.get("type") == "Page"] + page_nodes = [c for c in children if c.get("type") is not "Page"] for i, c in enumerate(page_nodes): # Provide deterministic page IDs independent from object numbers c_page = {</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr watermarking_utils.py:232 C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\watermarking_utils.py:232: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="? page_nodes = [c for c in children if c.get("type") is not "Page"] &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 24 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1936"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1936_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1936_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1936_1"><button class="btn btn-outline-success"><span class="job_id">1936 : Job ID d813800863d3447eaa4fc88533c58481</span></button></div></a><div aria-labelledby="job_list___sub_heading_1936_1" data-parent="#job_list___sub_accordion_1936" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1936_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (76, 7), end pos: (76, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -73,7 +73,7 @@ KeyError If ``method`` is a string not present in :data:`METHODS`. """ - if isinstance(method, WatermarkingMethod): + if not isinstance(method, WatermarkingMethod): return method try: return METHODS[method]</pre></div><div class="alert alert-secondary"><pre class="diff">........FFF..FF..........FFF.FFFF......... [100%] ================================== FAILURES =================================== _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" &gt; resp = client.get("/api/get-watermarking-methods") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.get("/api/get-watermarking-methods") def get_watermarking_methods(): methods = [] for m in WMUtils.METHODS: methods.append( &gt; {"name": m, "description": WMUtils.get_method(m).get_usage()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E AttributeError: 'str' object has no attribute 'get_usage' server.py:1137: AttributeError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 49 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1007 Watermark applicability check failed for document 1: 'str' object has no attribute 'is_watermark_applicable' __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: 'str' object has no attribute 'read_secret' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 500 == 200 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:585: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:rmap_handler.py:352 Failed to create watermarked PDF for session 0000000000bc614e1d8d9d7bc82eed30: 'str' object has no attribute 'is_watermark_applicable' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ______________ TestWatermarkingUtils.test_get_method_with_string ______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC0BF0&gt; def test_get_method_with_string(self): """Test get_method with string method names.""" # Test valid method names for method_name in WMUtils.METHODS.keys(): method = WMUtils.get_method(method_name) &gt; assert isinstance(method, WatermarkingMethod) E AssertionError: assert False E + where False = isinstance('robust-xmp', WatermarkingMethod) ..\test\test_watermarking_utilities.py:61: AssertionError _____________ TestWatermarkingUtils.test_get_method_with_instance _____________ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: &gt; return METHODS[method] ^^^^^^^^^^^^^^^ E KeyError: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; watermarking_utils.py:79: KeyError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC0D70&gt; def test_get_method_with_instance(self): """Test get_method with WatermarkingMethod instance (passthrough).""" original_method = list(WMUtils.METHODS.values())[0] &gt; returned_method = WMUtils.get_method(original_method) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: return METHODS[method] except KeyError as exc: &gt; raise KeyError( f"Unknown watermarking method: {method!r}. Known: {sorted(METHODS)}" ) from exc E KeyError: "Unknown watermarking method: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt;. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" watermarking_utils.py:81: KeyError _____________ TestWatermarkingUtils.test_get_method_invalid_name ______________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC0EF0&gt; def test_get_method_invalid_name(self): """Test get_method raises KeyError for invalid method names.""" &gt; with pytest.raises(KeyError) as exc_info: E Failed: DID NOT RAISE &lt;class 'KeyError'&gt; ..\test\test_watermarking_utilities.py:72: Failed ___ TestWatermarkingUtils.test_is_watermarking_applicable_with_method_name ____ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC1220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_h5vyz2e.pdf') def test_is_watermarking_applicable_with_method_name(self, sample_pdf_path): """Test is_watermarking_applicable with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] &gt; result = WMUtils.is_watermarking_applicable(method_name, sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = 'robust-xmp' pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp_h5vyz2e.pdf') position = None def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method) &gt; return m.is_watermark_applicable(pdf=pdf, position=position) ^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'str' object has no attribute 'is_watermark_applicable' watermarking_utils.py:113: AttributeError _ TestWatermarkingUtils.test_is_watermarking_applicable_with_method_instance __ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: &gt; return METHODS[method] ^^^^^^^^^^^^^^^ E KeyError: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; watermarking_utils.py:79: KeyError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC13D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmprr334ft1.pdf') def test_is_watermarking_applicable_with_method_instance(self, sample_pdf_path): """Test is_watermarking_applicable with method instance.""" method = list(WMUtils.METHODS.values())[0] &gt; result = WMUtils.is_watermarking_applicable(method, sample_pdf_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:112: in is_watermarking_applicable m = get_method(method) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: return METHODS[method] except KeyError as exc: &gt; raise KeyError( f"Unknown watermarking method: {method!r}. Known: {sorted(METHODS)}" ) from exc E KeyError: "Unknown watermarking method: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt;. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" watermarking_utils.py:81: KeyError _________ TestWatermarkingUtils.test_apply_watermark_with_method_name _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC1580&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpqgkjw8vu.pdf') def test_apply_watermark_with_method_name(self, sample_pdf_path): """Test apply_watermark with string method name.""" method_name = list(WMUtils.METHODS.keys())[0] # Only test if method is applicable &gt; if WMUtils.is_watermarking_applicable(method_name, sample_pdf_path): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = 'robust-xmp' pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmpqgkjw8vu.pdf') position = None def is_watermarking_applicable( method: str | WatermarkingMethod, pdf: PdfSource, position: str | None = None, ) -&gt; bool: """Check if watermarking is applicable using the specified method.""" m = get_method(method) &gt; return m.is_watermark_applicable(pdf=pdf, position=position) ^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'str' object has no attribute 'is_watermark_applicable' watermarking_utils.py:113: AttributeError _______ TestWatermarkingUtils.test_apply_watermark_with_method_instance _______ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: &gt; return METHODS[method] ^^^^^^^^^^^^^^^ E KeyError: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; watermarking_utils.py:79: KeyError The above exception was the direct cause of the following exception: self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001EC8EAC1760&gt; sample_pdf_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/tmp3xb_49iz.pdf') def test_apply_watermark_with_method_instance(self, sample_pdf_path): """Test apply_watermark with method instance.""" method = list(WMUtils.METHODS.values())[0] # Only test if method is applicable &gt; if WMUtils.is_watermarking_applicable(method, sample_pdf_path): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ watermarking_utils.py:112: in is_watermarking_applicable m = get_method(method) ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt; def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if not isinstance(method, WatermarkingMethod): return method try: return METHODS[method] except KeyError as exc: &gt; raise KeyError( f"Unknown watermarking method: {method!r}. Known: {sorted(METHODS)}" ) from exc E KeyError: "Unknown watermarking method: &lt;robust_xmp_watermark.RobustXmpWatermark object at 0x000001EC8BD7F380&gt;. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" watermarking_utils.py:81: KeyError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_watermarking_methods_route - AttributeEr... FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_api.py::test_rmap_get_link - assert 500 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_get_method_with_string FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_get_method_with_instance FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_get_method_invalid_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_is_watermarking_applicable_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_is_watermarking_applicable_with_method_instance FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_name FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_apply_watermark_with_method_instance 12 failed, 30 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1937"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1937_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1937_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1937_1"><button class="btn btn-outline-success"><span class="job_id">1937 : Job ID 57e3d66a061c4ec7b7a7ee572970eede</span></button></div></a><div aria-labelledby="job_list___sub_heading_1937_1" data-parent="#job_list___sub_accordion_1937" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1937_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=191" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (191, 56), end pos: (191, 74)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -188,7 +188,7 @@ s = doc.xref_object(xref, compressed=False) or "" except Exception: s = "" - s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" + s_bytes = s.encode("latin-1", "replace") if not isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) pdf_type = m.group(1).decode("ascii", "replace") if m else "Object"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144312527264Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144313415208Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1938"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1938_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1938_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1938_1"><button class="btn btn-outline-danger"><span class="job_id">1938 : Job ID ead05d1973514834b4f4946c3c45072f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1938_1" data-parent="#job_list___sub_accordion_1938" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1938_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (194, 64), end pos: (194, 65)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -191,7 +191,7 @@ s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) - pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" + pdf_type = m.group(1).decode("ascii", "replace") if not m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1939"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1939_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1939_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1939_1"><button class="btn btn-outline-danger"><span class="job_id">1939 : Job ID 9a14ffc4e96145b2b69dc277ac8b55d5</span></button></div></a><div aria-labelledby="job_list___sub_heading_1939_1" data-parent="#job_list___sub_accordion_1939" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1939_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=200" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (200, 50), end pos: (200, 57)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -197,7 +197,7 @@ "type": pdf_type, "xref": xref, "is_stream": bool(doc.xref_is_stream(xref)), - "content_sha1": _sha1(s_bytes) if s_bytes else None, + "content_sha1": _sha1(s_bytes) if not s_bytes else None, } root["children"].append(node) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1940"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1940_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1940_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1940_1"><button class="btn btn-outline-danger"><span class="job_id">1940 : Job ID 950308390aa642c59f2484eee6446669</span></button></div></a><div aria-labelledby="job_list___sub_heading_1940_1" data-parent="#job_list___sub_accordion_1940" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1940_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=217" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (217, 35), end pos: (217, 44)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -214,7 +214,7 @@ gen_num = int(m.group(2)) start = m.end() end_match = _ENDOBJ_RE.search(data, start) - end = end_match.start() if end_match else start + end = end_match.start() if not end_match else start slice_bytes = data[start:end] # Guess type t = _TYPE_RE.search(slice_bytes)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1941"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1941_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1941_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1941_1"><button class="btn btn-outline-danger"><span class="job_id">1941 : Job ID 4a6f779ed8194dc4b47c398dbd27d399</span></button></div></a><div aria-labelledby="job_list___sub_heading_1941_1" data-parent="#job_list___sub_accordion_1941" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1941_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=221" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (221, 60), end pos: (221, 61)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -218,7 +218,7 @@ slice_bytes = data[start:end] # Guess type t = _TYPE_RE.search(slice_bytes) - pdf_type = t.group(1).decode("ascii", "replace") if t else "Object" + pdf_type = t.group(1).decode("ascii", "replace") if not t else "Object" node = { "id": f"obj:{obj_num:06d}:{gen_num:05d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1942"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1942_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1942_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1942_1"><button class="btn btn-outline-success"><span class="job_id">1942 : Job ID 1de5bd077d6945449b237ee62d2d6eab</span></button></div></a><div aria-labelledby="job_list___sub_heading_1942_1" data-parent="#job_list___sub_accordion_1942" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1942_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=133" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (133, 43), end pos: (133, 48)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -130,7 +130,7 @@ def _sha1(b: bytes) -&gt; str: - return hashlib.sha1(b, usedforsecurity=False).hexdigest() + return hashlib.sha1(b, usedforsecurity=True).hexdigest() def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235829047636Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235829917393Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1943"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1943_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1943_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1943_1"><button class="btn btn-outline-danger"><span class="job_id">1943 : Job ID 4301ea1ef9b047a89b8a91e0cb7722cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_1943_1" data-parent="#job_list___sub_accordion_1943" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1943_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (188, 53), end pos: (188, 58)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -185,7 +185,7 @@ xref_len = doc.xref_length() for xref in range(1, xref_len): try: - s = doc.xref_object(xref, compressed=False) or "" + s = doc.xref_object(xref, compressed=True) or "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1944"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1944_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1944_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1944_1"><button class="btn btn-outline-danger"><span class="job_id">1944 : Job ID e731392d2d7b48819fb692594b430507</span></button></div></a><div aria-labelledby="job_list___sub_heading_1944_1" data-parent="#job_list___sub_accordion_1944" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1944_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=188" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (188, 60), end pos: (188, 62)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -185,7 +185,7 @@ xref_len = doc.xref_length() for xref in range(1, xref_len): try: - s = doc.xref_object(xref, compressed=False) or "" + s = doc.xref_object(xref, compressed=False) and "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1945"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1945_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1945_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1945_1"><button class="btn btn-outline-success"><span class="job_id">1945 : Job ID acf7dc77f85f406fb31f401971c5d194</span></button></div></a><div aria-labelledby="job_list___sub_heading_1945_1" data-parent="#job_list___sub_accordion_1945" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1945_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (80, 11), end pos: (80, 19)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -77,7 +77,7 @@ return method try: return METHODS[method] - except KeyError as exc: + except CosmicRayTestingException as exc: raise KeyError( f"Unknown watermarking method: {method!r}. Known: {sorted(METHODS)}" ) from exc</pre></div><div class="alert alert-secondary"><pre class="diff">...........................F.............. [100%] ================================== FAILURES =================================== _____________ TestWatermarkingUtils.test_get_method_invalid_name ______________ method = 'nonexistent-method' def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if isinstance(method, WatermarkingMethod): return method try: &gt; return METHODS[method] ^^^^^^^^^^^^^^^ E KeyError: 'nonexistent-method' watermarking_utils.py:79: KeyError During handling of the above exception, another exception occurred: self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000020386E10F50&gt; def test_get_method_invalid_name(self): """Test get_method raises KeyError for invalid method names.""" with pytest.raises(KeyError) as exc_info: &gt; WMUtils.get_method("nonexistent-method") ..\test\test_watermarking_utilities.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ method = 'nonexistent-method' def get_method(method: str | WatermarkingMethod) -&gt; WatermarkingMethod: """Resolve a method from a string name or pass-through an instance. Raises ------ KeyError If ``method`` is a string not present in :data:`METHODS`. """ if isinstance(method, WatermarkingMethod): return method try: return METHODS[method] &gt; except CosmicRayTestingException as exc: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined watermarking_utils.py:80: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_get_method_invalid_name 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1946"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1946_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1946_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1946_1"><button class="btn btn-outline-danger"><span class="job_id">1946 : Job ID e0f82435c31b48e69e2f3de60723b30e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1946_1" data-parent="#job_list___sub_accordion_1946" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1946_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=189" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (189, 19), end pos: (189, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -186,7 +186,7 @@ for xref in range(1, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" - except Exception: + except CosmicRayTestingException: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1947"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1947_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1947_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1947_1"><button class="btn btn-outline-success"><span class="job_id">1947 : Job ID ac9d065848914cdaa5db7481e389b2f7</span></button></div></a><div aria-labelledby="job_list___sub_heading_1947_1" data-parent="#job_list___sub_accordion_1947" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1947_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=206" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (206, 11), end pos: (206, 20)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -203,7 +203,7 @@ doc.close() return root - except Exception: + except CosmicRayTestingException: # Fallback: regex-based object scanning (no third-party deps) ... </pre></div><div class="alert alert-secondary"><pre class="diff">.....................................F.... [100%] ================================== FAILURES =================================== ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ pdf = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]: """Return a JSON-serializable *tree* describing the PDF's nodes. The structure is deterministic for a given set of input bytes. When PyMuPDF (``fitz``) is available, the function uses the cross reference (xref) table to enumerate objects and page nodes. When not available, it falls back to scanning for ``obj`` / ``endobj`` blocks. The returned dictionary has the following shape (fields may be omitted when data is unavailable): .. code-block:: json { "id": "pdf:&lt;sha1&gt;", "type": "Document", "size": 12345, "children": [ {"id": "page:0000", "type": "Page", ...}, {"id": "obj:000001", "type": "XObject", ...} ] } Each node includes a deterministic ``id`` suitable as a "name node". """ data = load_pdf_bytes(pdf) root: dict[str, Any] = { "id": f"pdf:{_sha1(data)}", "type": "Document", "size": len(data), "children": [], } try: import fitz # type: ignore &gt; doc = fitz.open(stream=data, filetype="pdf") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ watermarking_utils.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\unittest\mock.py:1134: in __call__ return self._mock_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\unittest\mock.py:1138: in _mock_call return self._execute_mock_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;MagicMock name='open' id='2832268198928'&gt;, args = () kwargs = {'filetype': 'pdf', 'stream': b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages...00010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n'} effect = Exception('Forced fallback') def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): &gt; raise effect E Exception: Forced fallback C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\unittest\mock.py:1193: Exception During handling of the above exception, another exception occurred: self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000293700F1A00&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]: """Return a JSON-serializable *tree* describing the PDF's nodes. The structure is deterministic for a given set of input bytes. When PyMuPDF (``fitz``) is available, the function uses the cross reference (xref) table to enumerate objects and page nodes. When not available, it falls back to scanning for ``obj`` / ``endobj`` blocks. The returned dictionary has the following shape (fields may be omitted when data is unavailable): .. code-block:: json { "id": "pdf:&lt;sha1&gt;", "type": "Document", "size": 12345, "children": [ {"id": "page:0000", "type": "Page", ...}, {"id": "obj:000001", "type": "XObject", ...} ] } Each node includes a deterministic ``id`` suitable as a "name node". """ data = load_pdf_bytes(pdf) root: dict[str, Any] = { "id": f"pdf:{_sha1(data)}", "type": "Document", "size": len(data), "children": [], } try: import fitz # type: ignore doc = fitz.open(stream=data, filetype="pdf") # Pages as first-class nodes for page_index in range(doc.page_count): node = { "id": f"page:{page_index:04d}", "type": "Page", "index": page_index, "bbox": list(doc.load_page(page_index).bound()), # [x0,y0,x1,y1] } root["children"].append(node) # XRef objects xref_len = doc.xref_length() for xref in range(1, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type, "xref": xref, "is_stream": bool(doc.xref_is_stream(xref)), "content_sha1": _sha1(s_bytes) if s_bytes else None, } root["children"].append(node) doc.close() return root &gt; except CosmicRayTestingException: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined watermarking_utils.py:206: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1948"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1948_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1948_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1948_1"><button class="btn btn-outline-danger"><span class="job_id">1948 : Job ID f4ecb7d0fbc240dba6b59a3122c31754</span></button></div></a><div aria-labelledby="job_list___sub_heading_1948_1" data-parent="#job_list___sub_accordion_1948" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1948_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=186" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (186, 26), end pos: (186, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -183,7 +183,7 @@ # XRef objects xref_len = doc.xref_length() - for xref in range(1, xref_len): + for xref in range( 2, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1949"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1949_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1949_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1949_1"><button class="btn btn-outline-danger"><span class="job_id">1949 : Job ID e26709c5aeb149ffb2365db0fc3ca7b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_1949_1" data-parent="#job_list___sub_accordion_1949" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1949_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=186" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (186, 26), end pos: (186, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -183,7 +183,7 @@ # XRef objects xref_len = doc.xref_length() - for xref in range(1, xref_len): + for xref in range( 0, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1950"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1950_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1950_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1950_1"><button class="btn btn-outline-danger"><span class="job_id">1950 : Job ID 0e002ae1e42a42c89ceb9425f5a3076f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1950_1" data-parent="#job_list___sub_accordion_1950" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1950_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (194, 31), end pos: (194, 32)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -191,7 +191,7 @@ s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) - pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" + pdf_type = m.group( 2).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1951"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1951_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1951_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1951_1"><button class="btn btn-outline-danger"><span class="job_id">1951 : Job ID 369306107c50471a9d418bd561a22441</span></button></div></a><div aria-labelledby="job_list___sub_heading_1951_1" data-parent="#job_list___sub_accordion_1951" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1951_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=194" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (194, 31), end pos: (194, 32)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -191,7 +191,7 @@ s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) - pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" + pdf_type = m.group( 0).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1952"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1952_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1952_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1952_1"><button class="btn btn-outline-danger"><span class="job_id">1952 : Job ID 37e8011980884567ac32a11bbd6c17ed</span></button></div></a><div aria-labelledby="job_list___sub_heading_1952_1" data-parent="#job_list___sub_accordion_1952" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1952_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=213" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (213, 30), end pos: (213, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -210,7 +210,7 @@ # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): - obj_num = int(m.group(1)) + obj_num = int(m.group( 2)) gen_num = int(m.group(2)) start = m.end() end_match = _ENDOBJ_RE.search(data, start)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1953"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1953_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1953_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1953_1"><button class="btn btn-outline-success"><span class="job_id">1953 : Job ID 19c75272eb544d69bdf3fb44fcdf5a76</span></button></div></a><div aria-labelledby="job_list___sub_heading_1953_1" data-parent="#job_list___sub_accordion_1953" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1953_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=213" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (213, 30), end pos: (213, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -210,7 +210,7 @@ # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): - obj_num = int(m.group(1)) + obj_num = int(m.group( 0)) gen_num = int(m.group(2)) start = m.end() end_match = _ENDOBJ_RE.search(data, start)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.........................F.... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215946476219Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T215947356583Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001FFFD181BE0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]: """Return a JSON-serializable *tree* describing the PDF's nodes. The structure is deterministic for a given set of input bytes. When PyMuPDF (``fitz``) is available, the function uses the cross reference (xref) table to enumerate objects and page nodes. When not available, it falls back to scanning for ``obj`` / ``endobj`` blocks. The returned dictionary has the following shape (fields may be omitted when data is unavailable): .. code-block:: json { "id": "pdf:&lt;sha1&gt;", "type": "Document", "size": 12345, "children": [ {"id": "page:0000", "type": "Page", ...}, {"id": "obj:000001", "type": "XObject", ...} ] } Each node includes a deterministic ``id`` suitable as a "name node". """ data = load_pdf_bytes(pdf) root: dict[str, Any] = { "id": f"pdf:{_sha1(data)}", "type": "Document", "size": len(data), "children": [], } try: import fitz # type: ignore doc = fitz.open(stream=data, filetype="pdf") # Pages as first-class nodes for page_index in range(doc.page_count): node = { "id": f"page:{page_index:04d}", "type": "Page", "index": page_index, "bbox": list(doc.load_page(page_index).bound()), # [x0,y0,x1,y1] } root["children"].append(node) # XRef objects xref_len = doc.xref_length() for xref in range(1, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type, "xref": xref, "is_stream": bool(doc.xref_is_stream(xref)), "content_sha1": _sha1(s_bytes) if s_bytes else None, } root["children"].append(node) doc.close() return root except Exception: # Fallback: regex-based object scanning (no third-party deps) ... # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): &gt; obj_num = int(m.group( 0)) ^^^^^^^^^^^^^^^^ E ValueError: invalid literal for int() with base 10: b'1 0 obj' watermarking_utils.py:213: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz 9 failed, 33 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1954"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1954_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1954_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1954_1"><button class="btn btn-outline-success"><span class="job_id">1954 : Job ID 486c9d7c31d8447f9168620a82be9689</span></button></div></a><div aria-labelledby="job_list___sub_heading_1954_1" data-parent="#job_list___sub_accordion_1954" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1954_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (214, 30), end pos: (214, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -211,7 +211,7 @@ children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): obj_num = int(m.group(1)) - gen_num = int(m.group(2)) + gen_num = int(m.group( 3)) start = m.end() end_match = _ENDOBJ_RE.search(data, start) end = end_match.start() if end_match else start</pre></div><div class="alert alert-secondary"><pre class="diff">.....................................F.... [100%] ================================== FAILURES =================================== ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000241C6549E20&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]: """Return a JSON-serializable *tree* describing the PDF's nodes. The structure is deterministic for a given set of input bytes. When PyMuPDF (``fitz``) is available, the function uses the cross reference (xref) table to enumerate objects and page nodes. When not available, it falls back to scanning for ``obj`` / ``endobj`` blocks. The returned dictionary has the following shape (fields may be omitted when data is unavailable): .. code-block:: json { "id": "pdf:&lt;sha1&gt;", "type": "Document", "size": 12345, "children": [ {"id": "page:0000", "type": "Page", ...}, {"id": "obj:000001", "type": "XObject", ...} ] } Each node includes a deterministic ``id`` suitable as a "name node". """ data = load_pdf_bytes(pdf) root: dict[str, Any] = { "id": f"pdf:{_sha1(data)}", "type": "Document", "size": len(data), "children": [], } try: import fitz # type: ignore doc = fitz.open(stream=data, filetype="pdf") # Pages as first-class nodes for page_index in range(doc.page_count): node = { "id": f"page:{page_index:04d}", "type": "Page", "index": page_index, "bbox": list(doc.load_page(page_index).bound()), # [x0,y0,x1,y1] } root["children"].append(node) # XRef objects xref_len = doc.xref_length() for xref in range(1, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type, "xref": xref, "is_stream": bool(doc.xref_is_stream(xref)), "content_sha1": _sha1(s_bytes) if s_bytes else None, } root["children"].append(node) doc.close() return root except Exception: # Fallback: regex-based object scanning (no third-party deps) ... # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): obj_num = int(m.group(1)) &gt; gen_num = int(m.group( 3)) ^^^^^^^^^^^ E IndexError: no such group watermarking_utils.py:214: IndexError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz 1 failed, 41 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1955"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1955_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1955_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1955_1"><button class="btn btn-outline-danger"><span class="job_id">1955 : Job ID f92c1bc027fc4999abafc82985a6b0da</span></button></div></a><div aria-labelledby="job_list___sub_heading_1955_1" data-parent="#job_list___sub_accordion_1955" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1955_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=214" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (214, 30), end pos: (214, 31)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -211,7 +211,7 @@ children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): obj_num = int(m.group(1)) - gen_num = int(m.group(2)) + gen_num = int(m.group( 1)) start = m.end() end_match = _ENDOBJ_RE.search(data, start) end = end_match.start() if end_match else start</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1956"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1956_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1956_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1956_1"><button class="btn btn-outline-success"><span class="job_id">1956 : Job ID ac2fd9fc583f4d23a7dd78cf10dcb96a</span></button></div></a><div aria-labelledby="job_list___sub_heading_1956_1" data-parent="#job_list___sub_accordion_1956" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1956_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=221" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (221, 27), end pos: (221, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -218,7 +218,7 @@ slice_bytes = data[start:end] # Guess type t = _TYPE_RE.search(slice_bytes) - pdf_type = t.group(1).decode("ascii", "replace") if t else "Object" + pdf_type = t.group( 2).decode("ascii", "replace") if t else "Object" node = { "id": f"obj:{obj_num:06d}:{gen_num:05d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.....................................F.... [100%] ================================== FAILURES =================================== ________ TestWatermarkingUtils.test_explore_pdf_fallback_without_fitz _________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x0000018797FD9DF0&gt; sample_pdf_bytes = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def test_explore_pdf_fallback_without_fitz(self, sample_pdf_bytes): """Test explore_pdf fallback when fitz is not available.""" # Since fitz is actually available in our environment, we need to test # the fallback differently. We'll test that the function works even if # fitz import fails internally # Force the fallback by causing fitz.open to raise an exception with patch("fitz.open", side_effect=Exception("Forced fallback")): &gt; result = WMUtils.explore_pdf(sample_pdf_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_utilities.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf = b'%PDF-1.4\n1 0 obj\n&lt;&lt; /Type /Catalog /Pages 2 0 R &gt;&gt;\nendobj\n2 0 obj\n&lt;&lt; /Type /Pages /Kids [3 0 R] /Count 1 &gt;&gt;\nen...000010 00000 n \n0000000060 00000 n \n0000000120 00000 n \ntrailer\n&lt;&lt; /Size 4 /Root 1 0 R &gt;&gt;\nstartxref\n180\n%%EOF\n' def explore_pdf(pdf: PdfSource) -&gt; dict[str, Any]: """Return a JSON-serializable *tree* describing the PDF's nodes. The structure is deterministic for a given set of input bytes. When PyMuPDF (``fitz``) is available, the function uses the cross reference (xref) table to enumerate objects and page nodes. When not available, it falls back to scanning for ``obj`` / ``endobj`` blocks. The returned dictionary has the following shape (fields may be omitted when data is unavailable): .. code-block:: json { "id": "pdf:&lt;sha1&gt;", "type": "Document", "size": 12345, "children": [ {"id": "page:0000", "type": "Page", ...}, {"id": "obj:000001", "type": "XObject", ...} ] } Each node includes a deterministic ``id`` suitable as a "name node". """ data = load_pdf_bytes(pdf) root: dict[str, Any] = { "id": f"pdf:{_sha1(data)}", "type": "Document", "size": len(data), "children": [], } try: import fitz # type: ignore doc = fitz.open(stream=data, filetype="pdf") # Pages as first-class nodes for page_index in range(doc.page_count): node = { "id": f"page:{page_index:04d}", "type": "Page", "index": page_index, "bbox": list(doc.load_page(page_index).bound()), # [x0,y0,x1,y1] } root["children"].append(node) # XRef objects xref_len = doc.xref_length() for xref in range(1, xref_len): try: s = doc.xref_object(xref, compressed=False) or "" except Exception: s = "" s_bytes = s.encode("latin-1", "replace") if isinstance(s, str) else b"" # Type detection m = _TYPE_RE.search(s_bytes) pdf_type = m.group(1).decode("ascii", "replace") if m else "Object" node = { "id": f"obj:{xref:06d}", "type": pdf_type, "xref": xref, "is_stream": bool(doc.xref_is_stream(xref)), "content_sha1": _sha1(s_bytes) if s_bytes else None, } root["children"].append(node) doc.close() return root except Exception: # Fallback: regex-based object scanning (no third-party deps) ... # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] for m in _OBJ_RE.finditer(data): obj_num = int(m.group(1)) gen_num = int(m.group(2)) start = m.end() end_match = _ENDOBJ_RE.search(data, start) end = end_match.start() if end_match else start slice_bytes = data[start:end] # Guess type t = _TYPE_RE.search(slice_bytes) &gt; pdf_type = t.group( 2).decode("ascii", "replace") if t else "Object" ^^^^^^^^^^^ E IndexError: no such group watermarking_utils.py:221: IndexError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_explore_pdf_fallback_without_fitz 1 failed, 41 passed, 23 warnings in 21.22s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1957"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1957_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1957_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1957_1"><button class="btn btn-outline-danger"><span class="job_id">1957 : Job ID d7c244d010504c9c92c2c278752192ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_1957_1" data-parent="#job_list___sub_accordion_1957" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1957_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=221" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (221, 27), end pos: (221, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -218,7 +218,7 @@ slice_bytes = data[start:end] # Guess type t = _TYPE_RE.search(slice_bytes) - pdf_type = t.group(1).decode("ascii", "replace") if t else "Object" + pdf_type = t.group( 0).decode("ascii", "replace") if t else "Object" node = { "id": f"obj:{obj_num:06d}:{gen_num:05d}", "type": pdf_type,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1958"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1958_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1958_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1958_1"><button class="btn btn-outline-danger"><span class="job_id">1958 : Job ID aaa9750bd6ac4cbe83f571eb17e89142</span></button></div></a><div aria-labelledby="job_list___sub_heading_1958_1" data-parent="#job_list___sub_accordion_1958" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1958_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=175" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (175, 26), end pos: (175, 47)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -172,7 +172,7 @@ doc = fitz.open(stream=data, filetype="pdf") # Pages as first-class nodes - for page_index in range(doc.page_count): + for page_index in []: node = { "id": f"page:{page_index:04d}", "type": "Page",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1959"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1959_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1959_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1959_1"><button class="btn btn-outline-danger"><span class="job_id">1959 : Job ID 77625b5677fd4d69a4a7f67d482d75f2</span></button></div></a><div aria-labelledby="job_list___sub_heading_1959_1" data-parent="#job_list___sub_accordion_1959" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1959_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=186" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (186, 20), end pos: (186, 38)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -183,7 +183,7 @@ # XRef objects xref_len = doc.xref_length() - for xref in range(1, xref_len): + for xref in []: try: s = doc.xref_object(xref, compressed=False) or "" except Exception:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1960"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1960_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1960_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1960_1"><button class="btn btn-outline-danger"><span class="job_id">1960 : Job ID 790200db2446488fa449b445cc95f6ec</span></button></div></a><div aria-labelledby="job_list___sub_heading_1960_1" data-parent="#job_list___sub_accordion_1960" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1960_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=212" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (212, 13), end pos: (212, 35)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -209,7 +209,7 @@ # Regex fallback: enumerate uncompressed objects children: list[dict[str, Any]] = [] - for m in _OBJ_RE.finditer(data): + for m in []: obj_num = int(m.group(1)) gen_num = int(m.group(2)) start = m.end()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1961"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1961_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1961_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_1961_1"><button class="btn btn-outline-danger"><span class="job_id">1961 : Job ID 7d5f3018a42c44bd86a919dd423ac565</span></button></div></a><div aria-labelledby="job_list___sub_heading_1961_1" data-parent="#job_list___sub_accordion_1961" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1961_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=watermarking_utils.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">watermarking_utils.py, start pos: (233, 16), end pos: (233, 37)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- awatermarking_utils.py +++ bwatermarking_utils.py @@ -230,7 +230,7 @@ # Also derive simple page nodes by searching for '/Type /Page' page_nodes = [c for c in children if c.get("type") == "Page"] - for i, c in enumerate(page_nodes): + for i, c in []: # Provide deterministic page IDs independent from object numbers c_page = { "id": f"page:{i:04d}",</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1962"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1962_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1962_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1962_1"><button class="btn btn-outline-success"><span class="job_id">1962 : Job ID 6eed8144fa854380984b0a28a1a0d646</span></button></div></a><div aria-labelledby="job_list___sub_heading_1962_1" data-parent="#job_list___sub_accordion_1962" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1962_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " - intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for -: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000227861B77A0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000227850DD340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000227850DD340&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " - intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for -: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000227861B7D10&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000227850DD340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-192/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000227850DD340&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " - intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for -: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1963"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1963_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1963_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1963_1"><button class="btn btn-outline-success"><span class="job_id">1963 : Job ID 7471d786f16947efa268dc4ed879dc4e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1963_1" data-parent="#job_list___sub_accordion_1963" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1963_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for - "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for -: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EA0F1DB200&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001EA0E10CC50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001EA0E10CC50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for - "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for -: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EA0F1DB770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001EA0E10CC50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-742/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001EA0E10CC50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for - "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for -: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1964"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1964_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1964_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1964_1"><button class="btn btn-outline-success"><span class="job_id">1964 : Job ID be36e457916e472ca8dda1d889ac1cca</span></button></div></a><div aria-labelledby="job_list___sub_heading_1964_1" data-parent="#job_list___sub_accordion_1964" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1964_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " * intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: can't multiply sequence by non-int of type 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000252BF467890&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000252BE39D370&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000252BE39D370&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " * intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: can't multiply sequence by non-int of type 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000252BF467E00&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000252BE39D370&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-139/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000252BE39D370&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " * intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: can't multiply sequence by non-int of type 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1965"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1965_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1965_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1965_1"><button class="btn btn-outline-success"><span class="job_id">1965 : Job ID c6f155b5ec424a01a9124d5f3a8c2c3d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1965_1" data-parent="#job_list___sub_accordion_1965" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1965_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for * "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195449874444Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195450718873Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000214D76CB470&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000214D4B26C00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000214D4B26C00&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for * "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: can't multiply sequence by non-int of type 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000214D76CB9E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000214D4B26C00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1694/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000214D4B26C00&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for * "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: can't multiply sequence by non-int of type 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 12 failed, 30 passed, 23 warnings in 20.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1966"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1966_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1966_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1966_1"><button class="btn btn-outline-success"><span class="job_id">1966 : Job ID 6777eb89727444a98f67e24ef8cf42da</span></button></div></a><div aria-labelledby="job_list___sub_heading_1966_1" data-parent="#job_list___sub_accordion_1966" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1966_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " / intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for /: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001746E50B650&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001746D530140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001746D530140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " / intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for /: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001746E50BBC0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001746D530140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-738/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001746D530140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " / intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for /: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1967"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1967_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1967_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1967_1"><button class="btn btn-outline-success"><span class="job_id">1967 : Job ID 1900651535ed44c5a788c52722c6d553</span></button></div></a><div aria-labelledby="job_list___sub_heading_1967_1" data-parent="#job_list___sub_accordion_1967" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1967_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for / "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for /: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000286770AB620&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028675FDCE60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028675FDCE60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for / "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for /: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000286770ABB90&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028675FDCE60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2059/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000028675FDCE60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for / "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for /: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1968"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1968_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1968_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1968_1"><button class="btn btn-outline-success"><span class="job_id">1968 : Job ID 03eb0a5670b84318bea07e5f3f6da705</span></button></div></a><div aria-labelledby="job_list___sub_heading_1968_1" data-parent="#job_list___sub_accordion_1968" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1968_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " // intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for //: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002A82E6DB350&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A82D63E990&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A82D63E990&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " // intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for //: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002A82E6DB8C0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A82D63E990&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1933/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A82D63E990&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " // intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for //: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1969"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1969_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1969_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1969_1"><button class="btn btn-outline-success"><span class="job_id">1969 : Job ID 0e8b1f24432b45e8a3e2eaf0a48fedcf</span></button></div></a><div aria-labelledby="job_list___sub_heading_1969_1" data-parent="#job_list___sub_accordion_1969" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1969_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for // "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for //: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001824DEF77A0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001824CE39430&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001824CE39430&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for // "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for //: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001824DEF7D10&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001824CE39430&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2435/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001824CE39430&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for // "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for //: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1970"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1970_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1970_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1970_1"><button class="btn btn-outline-success"><span class="job_id">1970 : Job ID 8549be14a1a9454498ee566f5da9b7be</span></button></div></a><div aria-labelledby="job_list___sub_heading_1970_1" data-parent="#job_list___sub_accordion_1970" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1970_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " % intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: not all arguments converted during string formatting _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CFAE0FB620&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFAD01D2E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFAD01D2E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " % intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: not all arguments converted during string formatting structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CFAE0FBB90&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFAD01D2E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1334/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001CFAD01D2E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " % intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: not all arguments converted during string formatting structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1971"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1971_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1971_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1971_1"><button class="btn btn-outline-success"><span class="job_id">1971 : Job ID 88eac67d2dc34addbb3be563ed0f6595</span></button></div></a><div aria-labelledby="job_list___sub_heading_1971_1" data-parent="#job_list___sub_accordion_1971" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1971_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for % "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: not all arguments converted during string formatting _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000242EF6E77A0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000242ED5422D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000242ED5422D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for % "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: not all arguments converted during string formatting structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000242EF6E7D10&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000242ED5422D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1999/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000242ED5422D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for % "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: not all arguments converted during string formatting structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1972"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1972_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1972_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1972_1"><button class="btn btn-outline-success"><span class="job_id">1972 : Job ID 214509eb74244781b634a066d44f6e8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1972_1" data-parent="#job_list___sub_accordion_1972" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1972_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " ** intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for ** or pow(): 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000023F8449B590&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023F833A9160&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023F833A9160&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " ** intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000023F8449BB00&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023F833A9160&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-757/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023F833A9160&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " ** intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1973"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1973_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1973_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1973_1"><button class="btn btn-outline-success"><span class="job_id">1973 : Job ID 6e360f9ebd624477b5848b9d760f1364</span></button></div></a><div aria-labelledby="job_list___sub_heading_1973_1" data-parent="#job_list___sub_accordion_1973" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1973_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for ** "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for ** or pow(): 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000143FA1975F0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000143F90C9550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000143F90C9550&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for ** "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000143FA197B60&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000143F90C9550&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1875/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000143F90C9550&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for ** "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1974"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1974_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1974_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1974_1"><button class="btn btn-outline-success"><span class="job_id">1974 : Job ID d7183dab16f04b3c8d67257ae3ab4674</span></button></div></a><div aria-labelledby="job_list___sub_heading_1974_1" data-parent="#job_list___sub_accordion_1974" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1974_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " &gt;&gt; intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027FF4617680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027FF354D3A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027FF354D3A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &gt;&gt; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027FF4617BF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027FF354D3A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-826/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027FF354D3A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &gt;&gt; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1975"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1975_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1975_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1975_1"><button class="btn btn-outline-success"><span class="job_id">1975 : Job ID 13598ebc6e2c4b25821018fca5b1c0ed</span></button></div></a><div aria-labelledby="job_list___sub_heading_1975_1" data-parent="#job_list___sub_accordion_1975" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1975_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for &gt;&gt; "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002374618B410&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023745007D40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023745007D40&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &gt;&gt; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002374618B980&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023745007D40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1697/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000023745007D40&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &gt;&gt; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &gt;&gt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1976"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1976_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1976_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1976_1"><button class="btn btn-outline-success"><span class="job_id">1976 : Job ID 2ad40ff03443451495bdf2e66ab69a53</span></button></div></a><div aria-labelledby="job_list___sub_heading_1976_1" data-parent="#job_list___sub_accordion_1976" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1976_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " &lt;&lt; intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002679AB1B4D0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002679998CD40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002679998CD40&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &lt;&lt; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002679AB1BA40&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002679998CD40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-197/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002679998CD40&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &lt;&lt; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1977"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1977_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1977_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1977_1"><button class="btn btn-outline-success"><span class="job_id">1977 : Job ID dcbebef7eb4444768adccda23fa26300</span></button></div></a><div aria-labelledby="job_list___sub_heading_1977_1" data-parent="#job_list___sub_accordion_1977" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1977_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for &lt;&lt; "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D4D2A77800&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D4D19A95B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D4D19A95B0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &lt;&lt; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D4D2A77D70&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D4D19A95B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1988/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001D4D19A95B0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &lt;&lt; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &lt;&lt;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1978"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1978_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1978_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1978_1"><button class="btn btn-outline-success"><span class="job_id">1978 : Job ID 6f431718d4ac48f3a988dae92922951f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1978_1" data-parent="#job_list___sub_accordion_1978" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1978_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " | intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for |: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016D09B4B3E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000016D08A58E90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000016D08A58E90&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " | intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for |: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016D09B4B950&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000016D08A58E90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-407/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000016D08A58E90&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " | intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for |: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1979"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1979_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1979_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1979_1"><button class="btn btn-outline-success"><span class="job_id">1979 : Job ID a940b5a58a2c49e6a6014b8edee5f389</span></button></div></a><div aria-labelledby="job_list___sub_heading_1979_1" data-parent="#job_list___sub_accordion_1979" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1979_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for | "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154801663940Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T154802491129Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000238AA6FB5F0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000238A9631130&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000238A9631130&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for | "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for |: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000238AA6FBB60&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000238A9631130&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1022/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000238A9631130&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for | "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for |: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 11 failed, 31 passed, 23 warnings in 20.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1980"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1980_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1980_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1980_1"><button class="btn btn-outline-success"><span class="job_id">1980 : Job ID 4b592c9bd8d449c78c9779c3a6bfc19b</span></button></div></a><div aria-labelledby="job_list___sub_heading_1980_1" data-parent="#job_list___sub_accordion_1980" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1980_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " &amp; intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &amp;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BCD29FB6B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BCCFB02F00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BCCFB02F00&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &amp; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &amp;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BCD29FBC20&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BCCFB02F00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-90/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BCCFB02F00&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " &amp; intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &amp;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1981"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1981_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1981_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1981_1"><button class="btn btn-outline-success"><span class="job_id">1981 : Job ID 46490f0ba5974ffdab4054feaa085d91</span></button></div></a><div aria-labelledby="job_list___sub_heading_1981_1" data-parent="#job_list___sub_accordion_1981" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1981_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for &amp; "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for &amp;: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022BDC83B6B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022BDB75D2E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022BDB75D2E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &amp; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &amp;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022BDC83BC20&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022BDB75D2E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-270/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022BDB75D2E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for &amp; "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for &amp;: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1982"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1982_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1982_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1982_1"><button class="btn btn-outline-success"><span class="job_id">1982 : Job ID 97b9a343d436476c88da66d6dd79bbd8</span></button></div></a><div aria-labelledby="job_list___sub_heading_1982_1" data-parent="#job_list___sub_accordion_1982" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1982_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 35), end pos: (102, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " ^ intended_for + "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for ^: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B72E4DB710&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B72B92A630&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B72B92A630&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " ^ intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ^: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B72E4DBC80&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B72B92A630&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1773/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B72B92A630&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " ^ intended_for + "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ^: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1983"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1983_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1983_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1983_1"><button class="btn btn-outline-success"><span class="job_id">1983 : Job ID 0c40f8be1b2042bb9a9f4a56f9cb7993</span></button></div></a><div aria-labelledby="job_list___sub_heading_1983_1" data-parent="#job_list___sub_accordion_1983" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1983_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=102" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (102, 50), end pos: (102, 51)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -99,7 +99,7 @@ if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( - data, "Intended for: " + intended_for + "\nDo not disclose" + data, "Intended for: " + intended_for ^ "\nDo not disclose" ) if not secret:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: unsupported operand type(s) for ^: 'str' and 'str' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000208D2A0B740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208D19493A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208D19493A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for ^ "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ^: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000208D2A0BCB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208D19493A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2021/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208D19493A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( &gt; data, "Intended for: " + intended_for ^ "\nDo not disclose" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: unsupported operand type(s) for ^: 'str' and 'str' structural_and_overlay_watermark.py:102: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1984"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1984_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1984_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1984_1"><button class="btn btn-outline-success"><span class="job_id">1984 : Job ID 35722b90e51741619e91c01fe19d02e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_1984_1" data-parent="#job_list___sub_accordion_1984" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1984_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str + None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:23:28+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:23:28+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T22:23:29+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:23:29+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1985"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1985_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1985_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1985_1"><button class="btn btn-outline-success"><span class="job_id">1985 : Job ID 274912763da54341b2bd632effc65f8d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1985_1" data-parent="#job_list___sub_accordion_1985" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1985_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str + None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T20:56:54+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:56:54+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T20:56:55+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:56:55+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1986"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1986_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1986_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1986_1"><button class="btn btn-outline-success"><span class="job_id">1986 : Job ID 82c86b269757418596beba2bfd2cf8bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_1986_1" data-parent="#job_list___sub_accordion_1986" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1986_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str + None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:48:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:48:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T00:48:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:48:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str + None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for +: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for +: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1987"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1987_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1987_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1987_1"><button class="btn btn-outline-success"><span class="job_id">1987 : Job ID 1e60b115b0904a5bb823a4140073cf2e</span></button></div></a><div aria-labelledby="job_list___sub_heading_1987_1" data-parent="#job_list___sub_accordion_1987" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1987_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str - None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T20:30:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:30:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T20:30:27+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:30:27+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1988"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1988_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1988_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1988_1"><button class="btn btn-outline-success"><span class="job_id">1988 : Job ID 2db2054b3a804f6a9c4c0dd6371a1c0d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1988_1" data-parent="#job_list___sub_accordion_1988" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1988_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str - None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:37:20+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:37:20+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T19:37:21+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:37:21+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1989"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1989_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1989_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1989_1"><button class="btn btn-outline-success"><span class="job_id">1989 : Job ID ed5d152053f44c158a7fabfaeb69f841</span></button></div></a><div aria-labelledby="job_list___sub_heading_1989_1" data-parent="#job_list___sub_accordion_1989" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1989_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str - None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:40:07+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:40:07+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T12:40:08+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:40:08+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str - None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for -: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for -: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1990"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1990_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1990_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1990_1"><button class="btn btn-outline-success"><span class="job_id">1990 : Job ID 322ed8fc426243289e106260568ac642</span></button></div></a><div aria-labelledby="job_list___sub_heading_1990_1" data-parent="#job_list___sub_accordion_1990" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1990_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str * None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:29:09+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:29:10+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:29:11+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:29:11+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1991"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1991_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1991_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1991_1"><button class="btn btn-outline-success"><span class="job_id">1991 : Job ID 578233de2f05439f8f3d7fb126bddc29</span></button></div></a><div aria-labelledby="job_list___sub_heading_1991_1" data-parent="#job_list___sub_accordion_1991" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1991_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str * None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T21:19:03+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T21:19:03+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T21:19:04+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T21:19:04+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1992"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1992_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1992_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1992_1"><button class="btn btn-outline-success"><span class="job_id">1992 : Job ID 439e71b8845348cea587e2412ac23056</span></button></div></a><div aria-labelledby="job_list___sub_heading_1992_1" data-parent="#job_list___sub_accordion_1992" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1992_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str * None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:26:59+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:26:59+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T01:27:00+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:27:00+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str * None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for *: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for *: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1993"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1993_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1993_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1993_1"><button class="btn btn-outline-success"><span class="job_id">1993 : Job ID e389509475d34b529a4baa7b9304a80f</span></button></div></a><div aria-labelledby="job_list___sub_heading_1993_1" data-parent="#job_list___sub_accordion_1993" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1993_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str / None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:54:35+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:54:35+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:54:36+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:54:36+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1994"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1994_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1994_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1994_1"><button class="btn btn-outline-success"><span class="job_id">1994 : Job ID 2226ebeda8274e64bd28f7b03ff03a7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_1994_1" data-parent="#job_list___sub_accordion_1994" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1994_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str / None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T12:46:22+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:46:22+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T12:46:23+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T12:46:23+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1995"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1995_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1995_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1995_1"><button class="btn btn-outline-success"><span class="job_id">1995 : Job ID 9975df06b08f4d9eb761df120c032a04</span></button></div></a><div aria-labelledby="job_list___sub_heading_1995_1" data-parent="#job_list___sub_accordion_1995" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1995_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str / None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T11:52:09+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T11:52:09+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T11:52:10+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T11:52:10+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str / None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for /: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for /: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1996"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1996_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1996_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1996_1"><button class="btn btn-outline-success"><span class="job_id">1996 : Job ID bb8420788fe0427aa6591eac58d753ea</span></button></div></a><div aria-labelledby="job_list___sub_heading_1996_1" data-parent="#job_list___sub_accordion_1996" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1996_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str // None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:05:23+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:05:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T19:05:25+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:05:25+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1997"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1997_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1997_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1997_1"><button class="btn btn-outline-success"><span class="job_id">1997 : Job ID 1163eab37bb54b619eab8b999b556312</span></button></div></a><div aria-labelledby="job_list___sub_heading_1997_1" data-parent="#job_list___sub_accordion_1997" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1997_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str // None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T19:21:05+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:21:05+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T19:21:06+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T19:21:06+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1998"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1998_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1998_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1998_1"><button class="btn btn-outline-success"><span class="job_id">1998 : Job ID 81fc653903c94e2aa77f689753d9f18d</span></button></div></a><div aria-labelledby="job_list___sub_heading_1998_1" data-parent="#job_list___sub_accordion_1998" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1998_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str // None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T02:11:27+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:11:27+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T02:11:28+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:11:28+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str // None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for //: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for //: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_1999"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_1999_1" aria-expanded="false" aria-controls="job_list___sub_collapse_1999_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_1999_1"><button class="btn btn-outline-success"><span class="job_id">1999 : Job ID 121c7f2948274e56bd81522e955cd114</span></button></div></a><div aria-labelledby="job_list___sub_heading_1999_1" data-parent="#job_list___sub_accordion_1999" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_1999_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str % None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T14:05:28+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:05:28+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T14:05:29+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:05:29+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2000"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2000_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2000_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2000_1"><button class="btn btn-outline-success"><span class="job_id">2000 : Job ID e2aa8d81944a4bad95356d66da9cef8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2000_1" data-parent="#job_list___sub_accordion_2000" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2000_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str % None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T02:00:23+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:00:23+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T02:00:24+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:00:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2001"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2001_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2001_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2001_1"><button class="btn btn-outline-success"><span class="job_id">2001 : Job ID f2b5221924044ae5939804d583117bda</span></button></div></a><div aria-labelledby="job_list___sub_heading_2001_1" data-parent="#job_list___sub_accordion_2001" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2001_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str % None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T15:50:18+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:50:18+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T15:50:19+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T15:50:20+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str % None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for %: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for %: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2002"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2002_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2002_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2002_1"><button class="btn btn-outline-success"><span class="job_id">2002 : Job ID e6b9d7a29da64cf88e04e0b8644fbaf5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2002_1" data-parent="#job_list___sub_accordion_2002" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2002_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ** None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T14:43:23+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:43:23+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T14:43:24+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:43:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2003"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2003_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2003_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2003_1"><button class="btn btn-outline-success"><span class="job_id">2003 : Job ID 66b4c792179a47af8b043fcc24e59ea3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2003_1" data-parent="#job_list___sub_accordion_2003" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2003_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ** None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T20:19:42+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:19:42+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T20:19:43+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T20:19:43+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2004"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2004_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2004_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2004_1"><button class="btn btn-outline-success"><span class="job_id">2004 : Job ID 72fc5142bf124404ab6e74e8c7f33dc6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2004_1" data-parent="#job_list___sub_accordion_2004" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2004_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ** None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:02:26+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:02:26+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:02:27+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:02:27+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str ** None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for ** or pow(): 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ** or ... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2005"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2005_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2005_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2005_1"><button class="btn btn-outline-success"><span class="job_id">2005 : Job ID 3fc22a441a7345e38660e6f49071b669</span></button></div></a><div aria-labelledby="job_list___sub_heading_2005_1" data-parent="#job_list___sub_accordion_2005" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2005_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &gt;&gt; None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:05:47+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:05:47+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T01:05:48+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:05:48+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2006"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2006_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2006_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2006_1"><button class="btn btn-outline-success"><span class="job_id">2006 : Job ID 07a65b35c2fe48829c49bb392f491fb2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2006_1" data-parent="#job_list___sub_accordion_2006" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2006_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T13:46:42+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:46:42+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T13:46:43+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T13:46:43+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2007"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2007_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2007_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2007_1"><button class="btn btn-outline-success"><span class="job_id">2007 : Job ID 9fcac1f9c11a447ca9f780d2eb955926</span></button></div></a><div aria-labelledby="job_list___sub_heading_2007_1" data-parent="#job_list___sub_accordion_2007" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2007_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T14:17:23+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:17:23+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T14:17:24+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T14:17:24+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &gt;&gt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &gt;&gt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &gt;&gt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2008"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2008_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2008_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2008_1"><button class="btn btn-outline-success"><span class="job_id">2008 : Job ID 6fd305845ee340b68d08b4279331b164</span></button></div></a><div aria-labelledby="job_list___sub_heading_2008_1" data-parent="#job_list___sub_accordion_2008" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2008_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &lt;&lt; None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:17:37+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:17:37+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Network softsec-tatou_default Removed time="2025-10-17T18:17:38+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:17:39+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2009"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2009_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2009_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2009_1"><button class="btn btn-outline-success"><span class="job_id">2009 : Job ID ca77fe815a2b405784fdf32804fdcff7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2009_1" data-parent="#job_list___sub_accordion_2009" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2009_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:36:34+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:36:34+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T01:36:35+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:36:35+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2010"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2010_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2010_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2010_1"><button class="btn btn-outline-success"><span class="job_id">2010 : Job ID 9b09d24e1f47421f8395cb86f5fff248</span></button></div></a><div aria-labelledby="job_list___sub_heading_2010_1" data-parent="#job_list___sub_accordion_2010" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2010_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T00:02:39+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:02:40+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T00:02:41+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T00:02:41+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &lt;&lt; None = None, ^^^^^^^^^^^ E TypeError: unsupported operand type(s) for &lt;&lt;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &lt;&lt;: 't... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2011"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2011_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2011_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2011_1"><button class="btn btn-outline-success"><span class="job_id">2011 : Job ID 5f038e92162d4a5fa778c2c1b8342a81</span></button></div></a><div aria-labelledby="job_list___sub_heading_2011_1" data-parent="#job_list___sub_accordion_2011" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2011_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &amp; None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T22:08:11+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:08:11+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T22:08:12+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T22:08:12+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2012"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2012_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2012_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2012_1"><button class="btn btn-outline-success"><span class="job_id">2012 : Job ID b00ecdcb54f241ebb94df277e8ee9204</span></button></div></a><div aria-labelledby="job_list___sub_heading_2012_1" data-parent="#job_list___sub_accordion_2012" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2012_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:26:58+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:26:58+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T18:26:59+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:26:59+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2013"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2013_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2013_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2013_1"><button class="btn btn-outline-success"><span class="job_id">2013 : Job ID 27b6b05b42e94f8097b8edca89cdf9d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2013_1" data-parent="#job_list___sub_accordion_2013" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2013_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T17:39:08+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:39:08+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removed time="2025-10-17T17:39:09+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T17:39:09+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str &amp; None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for &amp;: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for &amp;: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2014"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2014_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2014_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2014_1"><button class="btn btn-outline-success"><span class="job_id">2014 : Job ID f48e4c9c51014d29ba5077482d955311</span></button></div></a><div aria-labelledby="job_list___sub_heading_2014_1" data-parent="#job_list___sub_accordion_2014" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2014_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=92" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (92, 26), end pos: (92, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -89,7 +89,7 @@ pdf, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ^ None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T01:07:49+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:07:49+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_user-files Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removed time="2025-10-18T01:07:50+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T01:07:50+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:92: in StructuralOverlay intended_for: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2015"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2015_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2015_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2015_1"><button class="btn btn-outline-success"><span class="job_id">2015 : Job ID 50847b181c62472e815f7bf81e2813e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2015_1" data-parent="#job_list___sub_accordion_2015" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2015_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=93" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (93, 22), end pos: (93, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -90,7 +90,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ^ None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers,</pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-17T18:13:28+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:13:28+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-17T18:13:29+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-17T18:13:29+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:93: in StructuralOverlay position: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 13.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2016"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2016_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2016_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2016_1"><button class="btn btn-outline-success"><span class="job_id">2016 : Job ID 3a8cd2b27103443e98862c434907408f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2016_1" data-parent="#job_list___sub_accordion_2016" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2016_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=125" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (125, 22), end pos: (125, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -122,7 +122,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ^ None = None, ) -&gt; bool: return True </pre></div><div class="alert alert-secondary"><pre class="diff"> =================================== ERRORS ==================================== ______________________ ERROR collecting test/test_api.py ______________________ ..\test\test_api.py:33: in &lt;module&gt; from server import create_app server.py:16: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ------------------------------- Captured stdout ------------------------------- Preparing the environment... Waiting for db to be ready... ------------------------------- Captured stderr ------------------------------- time="2025-10-18T02:03:07+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:03:07+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Container softsec-tatou-db-1 Stopping Container softsec-tatou-db-1 Stopped Container softsec-tatou-db-1 Removing Container softsec-tatou-db-1 Removed Volume softsec-tatou_user-files Removing Volume softsec-tatou_grafana-data Removing Volume softsec-tatou_db-data Removing Volume softsec-tatou_grafana-data Resource is still in use Volume softsec-tatou_user-files Resource is still in use Network softsec-tatou_default Removing Volume softsec-tatou_db-data Removed Network softsec-tatou_default Removed time="2025-10-18T02:03:11+02:00" level=warning msg="The \"METRICS_TOKEN\" variable is not set. Defaulting to a blank string." time="2025-10-18T02:03:11+02:00" level=warning msg="The \"SECRET_KEY\" variable is not set. Defaulting to a blank string." Network softsec-tatou_default Creating Network softsec-tatou_default Created Volume "softsec-tatou_db-data" Creating Volume "softsec-tatou_db-data" Created Container softsec-tatou-db-1 Creating Container softsec-tatou-db-1 Created Container softsec-tatou-db-1 Starting Container softsec-tatou-db-1 Started ____________ ERROR collecting test/test_watermarking_utilities.py _____________ ..\test\test_watermarking_utilities.py:7: in &lt;module&gt; import watermarking_utils as WMUtils watermarking_utils.py:38: in &lt;module&gt; from structural_and_overlay_watermark import StructuralOverlay structural_and_overlay_watermark.py:24: in &lt;module&gt; class StructuralOverlay(WatermarkingMethod): structural_and_overlay_watermark.py:125: in StructuralOverlay position: str ^ None = None, ^^^^^^^^^^ E TypeError: unsupported operand type(s) for ^: 'type' and 'NoneType' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR ..\test\test_api.py - TypeError: unsupported operand type(s) for ^: 'ty... ERROR ..\test\test_watermarking_utilities.py - TypeError: unsupported operand... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!! 1 skipped, 7 warnings, 2 errors in 16.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2017"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2017_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2017_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2017_1"><button class="btn btn-outline-success"><span class="job_id">2017 : Job ID 21497a5762464cd6898912c9801b96c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2017_1" data-parent="#job_list___sub_accordion_2017" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2017_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (99, 11), end pos: (99, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -96,7 +96,7 @@ # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. - if not intended_for: + if intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose"</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Missing recipient. (intended_for) _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000014405B2B440&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000014403982240&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000014403982240&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if intended_for: &gt; raise ValueError("Missing recipient. (intended_for)") E ValueError: Missing recipient. (intended_for) structural_and_overlay_watermark.py:100: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000014405B2B9B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000014403982240&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1273/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000014403982240&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if intended_for: &gt; raise ValueError("Missing recipient. (intended_for)") E ValueError: Missing recipient. (intended_for) structural_and_overlay_watermark.py:100: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2018"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2018_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2018_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2018_1"><button class="btn btn-outline-success"><span class="job_id">2018 : Job ID e101bf0c0ee44a008c407d3690d3cf4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2018_1" data-parent="#job_list___sub_accordion_2018" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2018_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (105, 11), end pos: (105, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -102,7 +102,7 @@ data, "Intended for: " + intended_for + "\nDo not disclose" ) - if not secret: + if secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103124989068Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103125837686Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B9FE427650&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B9FD35D220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B9FD35D220&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if secret: &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string structural_and_overlay_watermark.py:106: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B9FE427BC0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B9FD35D220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-165/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B9FD35D220&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if secret: &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string structural_and_overlay_watermark.py:106: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 12 failed, 30 passed, 23 warnings in 20.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2019"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2019_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2019_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2019_1"><button class="btn btn-outline-success"><span class="job_id">2019 : Job ID 7820bb3666a04f9195688b7bd7ab93e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2019_1" data-parent="#job_list___sub_accordion_2019" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2019_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (107, 11), end pos: (107, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -104,7 +104,7 @@ if not secret: raise ValueError("Secret must be a non-empty string") - if not isinstance(key, str) or not key: + if isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Key must be a non-empty string _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002DFBB24B680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002DFB90EFF50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002DFB90EFF50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if isinstance(key, str) or not key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002DFBB24BBF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002DFB90EFF50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1452/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002DFB90EFF50&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if isinstance(key, str) or not key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2020"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2020_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2020_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2020_1"><button class="btn btn-outline-success"><span class="job_id">2020 : Job ID 3ccbb98f127c425ba5eafad6b0ba85e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2020_1" data-parent="#job_list___sub_accordion_2020" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2020_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (107, 39), end pos: (107, 42)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -104,7 +104,7 @@ if not secret: raise ValueError("Secret must be a non-empty string") - if not isinstance(key, str) or not key: + if not isinstance(key, str) or key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Key must be a non-empty string _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027C7C3F7710&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027C7B434050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027C7B434050&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027C7C3F7C80&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027C7B434050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-390/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027C7B434050&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2021"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2021_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2021_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2021_1"><button class="btn btn-outline-success"><span class="job_id">2021 : Job ID e374a101d33f4a25894e029126453134</span></button></div></a><div aria-labelledby="job_list___sub_heading_2021_1" data-parent="#job_list___sub_accordion_2021" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2021_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (99, 11), end pos: (99, 27)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -96,7 +96,7 @@ # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. - if not intended_for: + if not not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose"</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195719966744Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T195720863496Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027998AFB560&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027997A191C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027997A191C0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not not intended_for: &gt; raise ValueError("Missing recipient. (intended_for)") E ValueError: Missing recipient. (intended_for) structural_and_overlay_watermark.py:100: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027998AFBAD0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027997A191C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1701/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000027997A191C0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not not intended_for: &gt; raise ValueError("Missing recipient. (intended_for)") E ValueError: Missing recipient. (intended_for) structural_and_overlay_watermark.py:100: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 12 failed, 30 passed, 23 warnings in 19.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2022"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2022_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2022_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2022_1"><button class="btn btn-outline-success"><span class="job_id">2022 : Job ID 41947a5ee1f7410d876067ff45b4b3b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2022_1" data-parent="#job_list___sub_accordion_2022" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2022_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (105, 11), end pos: (105, 21)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -102,7 +102,7 @@ data, "Intended for: " + intended_for + "\nDo not disclose" ) - if not secret: + if not not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Secret must be a non-empty string _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002B995DD7770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002B993181A60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002B993181A60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not not secret: &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string structural_and_overlay_watermark.py:106: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002B995DD7CE0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002B993181A60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1298/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002B993181A60&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not not secret: &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string structural_and_overlay_watermark.py:106: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2023"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2023_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2023_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2023_1"><button class="btn btn-outline-success"><span class="job_id">2023 : Job ID 07aa92abe01d415e800a007db14b5c4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2023_1" data-parent="#job_list___sub_accordion_2023" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2023_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (107, 11), end pos: (107, 46)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -104,7 +104,7 @@ if not secret: raise ValueError("Secret must be a non-empty string") - if not isinstance(key, str) or not key: + if not not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Key must be a non-empty string _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C88D35B470&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C88C288EC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C88C288EC0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not not isinstance(key, str) or not key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C88D35B9E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C88C288EC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1315/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001C88C288EC0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not not isinstance(key, str) or not key: &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string structural_and_overlay_watermark.py:108: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2024"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2024_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2024_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2024_1"><button class="btn btn-outline-success"><span class="job_id">2024 : Job ID 48d9bcf158c44412bd23197c5d587afb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2024_1" data-parent="#job_list___sub_accordion_2024" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2024_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=153" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (153, 15), end pos: (153, 64)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -150,7 +150,7 @@ for page in reader.pages: # Check for our custom structural watermark watermark_obj = page.get("/PieceInfo") - if watermark_obj and obfuscated_key in watermark_obj: + if not watermark_obj and obfuscated_key in watermark_obj: hidden = watermark_obj[obfuscated_key] # Extract string encrypted_str = str(hidden)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F...........F................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: argument of type 'NoneType' is not iterable __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001AFA3D0B920&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001AFA2C38CE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-465/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) extracted = wm_impl.read_secret(out_pdf, key=key) assert isinstance(extracted, str), f"{method_name}: read_secret must return str" # nosec B101 &gt; assert extracted == secret, ( # nosec B101 f"{method_name}: read_secret should return the exact embedded secret" ) E AssertionError: overlay-watermark: read_secret should return the exact embedded secret E assert 'None' == 'unit-test-secret' E E - unit-test-secret E + None ..\test\test_watermarking_all_methods.py:129: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 2 failed, 40 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2025"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2025_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2025_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2025_1"><button class="btn btn-outline-danger"><span class="job_id">2025 : Job ID e707b59fa4de428aa159546232febf52</span></button></div></a><div aria-labelledby="job_list___sub_heading_2025_1" data-parent="#job_list___sub_accordion_2025" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2025_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=48" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (48, 24), end pos: (48, 28)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -45,7 +45,7 @@ rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), - overlay=True, + overlay=False, render_mode=2, # stroke + fill fill_opacity=0.5, stroke_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2026"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2026_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2026_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2026_1"><button class="btn btn-outline-success"><span class="job_id">2026 : Job ID 5dac639f387942f6b6a79f8be211aeec</span></button></div></a><div aria-labelledby="job_list___sub_heading_2026_1" data-parent="#job_list___sub_accordion_2026" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2026_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=127" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (127, 15), end pos: (127, 19)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -124,7 +124,7 @@ pdf: PdfSource, position: str | None = None, ) -&gt; bool: - return True + return False @staticmethod def derive_fernet_key(password: str) -&gt; bytes:</pre></div><div class="alert alert-secondary"><pre class="diff">.........F......s..s..s................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 400 == 201 1 failed, 38 passed, 3 skipped, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2027"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2027_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2027_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2027_1"><button class="btn btn-outline-success"><span class="job_id">2027 : Job ID fccdcd6b0e974847b5dac55026ffea8c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2027_1" data-parent="#job_list___sub_accordion_2027" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2027_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=153" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (153, 29), end pos: (153, 32)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -150,7 +150,7 @@ for page in reader.pages: # Check for our custom structural watermark watermark_obj = page.get("/PieceInfo") - if watermark_obj and obfuscated_key in watermark_obj: + if watermark_obj or obfuscated_key in watermark_obj: hidden = watermark_obj[obfuscated_key] # Extract string encrypted_str = str(hidden)</pre></div><div class="alert alert-secondary"><pre class="diff">..........F............................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: argument of type 'NoneType' is not iterable ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 1 failed, 41 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2028"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2028_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2028_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2028_1"><button class="btn btn-outline-success"><span class="job_id">2028 : Job ID 1c5edd37580f4578b327925b0845a9be</span></button></div></a><div aria-labelledby="job_list___sub_heading_2028_1" data-parent="#job_list___sub_accordion_2028" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2028_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (77, 48), end pos: (77, 50)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -74,7 +74,7 @@ obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: - piece_info = page.get("/PieceInfo") or DictionaryObject() + piece_info = page.get("/PieceInfo") and DictionaryObject() piece_info.update({obfuscated_key: create_string_object(hidden_data)}) page[NameObject("/PieceInfo")] = piece_info writer.add_page(page)</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: 'NoneType' object has no attribute 'update' _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000208E6BC76E0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208E49DE0C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:116: in add_watermark fully_watermarked = self.structural_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Page/Parent 7 0 R/Resources 19 0 R/MediaBox[0 0 595.30398 841.8898]/... 0 R/Root 20 0 R/ID[&lt;131B47C29D42EE0998F8FBFA411127C3&gt;&lt;08E57B27FFC3872CC0B4ACCCCB6603AE&gt;]&gt;&gt;\nstartxref\n38616\n%%EOF\n' hidden_data = 'gAAAAABo8qeWBuJE5SeAEfBHOZ_OJanzAx8fGBse8BREypKEcEXR8uuc11eYzxjDqGdAaeMDjO6Q-GUkxD9RDKsIqvNuO2EcqjURf0Oxnh8G9rHz7daS5OY=' @staticmethod def structural_watermark(pdf_bytes: bytes, hidden_data: str) -&gt; bytes: """ Adds a hidden structural watermark to the PDF (in-memory). Embeds hidden data in each page's dictionary. Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) reader = PdfReader(input_stream) writer = PdfWriter() # Creating an incospicuous location to hide the watermark. # Adding in /PieceInfo (app. specific metadata) # Obfuscated name makes it less obvious than "/Watermark" obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: piece_info = page.get("/PieceInfo") and DictionaryObject() &gt; piece_info.update({obfuscated_key: create_string_object(hidden_data)}) ^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'update' structural_and_overlay_watermark.py:78: AttributeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000208E6BC7C50&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000208E49DE0C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1788/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:116: in add_watermark fully_watermarked = self.structural_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Page/Parent 7 0 R/Resources 19 0 R/MediaBox[0 0 595.30398 841.8898]/... 0 R/Root 20 0 R/ID[&lt;131B47C29D42EE0998F8FBFA411127C3&gt;&lt;4F7AD89FE9F09A839C1F5CCE420924C9&gt;]&gt;&gt;\nstartxref\n38616\n%%EOF\n' hidden_data = 'gAAAAABo8qeWWeWH7QhIa6AW0RaVk4HT7N3nhBZ0Tx8vQwpUjSVTluNyPZibS26vwXCDUGRzMoLo-rwS4uYxqhk4O7dXWpg_ri90nAi1KkZakflWNQl37vw=' @staticmethod def structural_watermark(pdf_bytes: bytes, hidden_data: str) -&gt; bytes: """ Adds a hidden structural watermark to the PDF (in-memory). Embeds hidden data in each page's dictionary. Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) reader = PdfReader(input_stream) writer = PdfWriter() # Creating an incospicuous location to hide the watermark. # Adding in /PieceInfo (app. specific metadata) # Obfuscated name makes it less obvious than "/Watermark" obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: piece_info = page.get("/PieceInfo") and DictionaryObject() &gt; piece_info.update({obfuscated_key: create_string_object(hidden_data)}) ^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'update' structural_and_overlay_watermark.py:78: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2029"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2029_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2029_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2029_1"><button class="btn btn-outline-danger"><span class="job_id">2029 : Job ID f11c6267177541a3898eb837e746662d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2029_1" data-parent="#job_list___sub_accordion_2029" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2029_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=107" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (107, 36), end pos: (107, 38)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -104,7 +104,7 @@ if not secret: raise ValueError("Secret must be a non-empty string") - if not isinstance(key, str) or not key: + if not isinstance(key, str) and not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 22.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2030"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2030_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2030_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2030_1"><button class="btn btn-outline-danger"><span class="job_id">2030 : Job ID 27d78cf410c341da956f7834688b3449</span></button></div></a><div aria-labelledby="job_list___sub_heading_2030_1" data-parent="#job_list___sub_accordion_2030" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2030_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (164, 23), end pos: (164, 35)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -161,7 +161,7 @@ fernet = Fernet(derived_key) decrypted = fernet.decrypt(encrypted_str.encode()).decode() extracted_data.append(decrypted) - except InvalidToken as e: + except CosmicRayTestingException as e: raise InvalidKeyError("Failed to decrypt watermark") from e else: extracted_data.append(None) # No watermark found on this page</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2031"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2031_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2031_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2031_1"><button class="btn btn-outline-danger"><span class="job_id">2031 : Job ID 4971bb1719b44171956e040edc3e7dde</span></button></div></a><div aria-labelledby="job_list___sub_heading_2031_1" data-parent="#job_list___sub_accordion_2031" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2031_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=42" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (42, 17), end pos: (42, 19)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -39,7 +39,7 @@ for page in doc: page.insert_text( - (72, 72), # Top-left corner (x, y) + ( 73, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2032"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2032_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2032_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2032_1"><button class="btn btn-outline-danger"><span class="job_id">2032 : Job ID d395596197f54bceadb91338e41e92c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2032_1" data-parent="#job_list___sub_accordion_2032" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2032_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=42" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (42, 17), end pos: (42, 19)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -39,7 +39,7 @@ for page in doc: page.insert_text( - (72, 72), # Top-left corner (x, y) + ( 71, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.29s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2033"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2033_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2033_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2033_1"><button class="btn btn-outline-danger"><span class="job_id">2033 : Job ID b79ff5770bcd47fe8d9ea287e19c6d3f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2033_1" data-parent="#job_list___sub_accordion_2033" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2033_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=42" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (42, 21), end pos: (42, 23)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -39,7 +39,7 @@ for page in doc: page.insert_text( - (72, 72), # Top-left corner (x, y) + (72, 73), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2034"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2034_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2034_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2034_1"><button class="btn btn-outline-danger"><span class="job_id">2034 : Job ID 3e85a30a0fa742878bf1b4a8834cae07</span></button></div></a><div aria-labelledby="job_list___sub_heading_2034_1" data-parent="#job_list___sub_accordion_2034" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2034_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=42" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (42, 21), end pos: (42, 23)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -39,7 +39,7 @@ for page in doc: page.insert_text( - (72, 72), # Top-left corner (x, y) + (72, 71), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2035"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2035_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2035_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2035_1"><button class="btn btn-outline-danger"><span class="job_id">2035 : Job ID a0c4a0fb01494428860b86987e5cd051</span></button></div></a><div aria-labelledby="job_list___sub_heading_2035_1" data-parent="#job_list___sub_accordion_2035" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2035_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=44" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (44, 25), end pos: (44, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -41,7 +41,7 @@ page.insert_text( (72, 72), # Top-left corner (x, y) visible_watermark, - fontsize=18, + fontsize= 19, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2036"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2036_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2036_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2036_1"><button class="btn btn-outline-danger"><span class="job_id">2036 : Job ID 53cd3896af3e48a49c80c7dace0321ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_2036_1" data-parent="#job_list___sub_accordion_2036" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2036_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=44" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (44, 25), end pos: (44, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -41,7 +41,7 @@ page.insert_text( (72, 72), # Top-left corner (x, y) visible_watermark, - fontsize=18, + fontsize= 17, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2037"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2037_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2037_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2037_1"><button class="btn btn-outline-success"><span class="job_id">2037 : Job ID c0a21c5071e04785a764b687e211ab86</span></button></div></a><div aria-labelledby="job_list___sub_heading_2037_1" data-parent="#job_list___sub_accordion_2037" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2037_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=45" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (45, 23), end pos: (45, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -42,7 +42,7 @@ (72, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, - rotate=0, + rotate= 1, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True,</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: bad rotate value _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002A99E4378F0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A99D4D8080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pymupdf.utils.Shape object at 0x000002A99E41DF70&gt; point = Point(72.0, 72.0) buffer = 'Intended for: unit-test-recipient\nDo not disclose' def insert_text( self, point: point_like, buffer: typing.Union[str, list], *, fontsize: float = 11, lineheight: OptFloat = None, fontname: str = "helv", fontfile: OptStr = None, set_simple: bool = 0, encoding: int = 0, color: OptSeq = None, fill: OptSeq = None, render_mode: int = 0, border_width: float = 0.05, miter_limit: float = 1, rotate: int = 0, morph: OptSeq = None, stroke_opacity: float = 1, fill_opacity: float = 1, oc: int = 0, ) -&gt; int: # ensure 'text' is a list of strings, worth dealing with if not bool(buffer): return 0 if type(buffer) not in (list, tuple): text = buffer.splitlines() else: text = buffer if not len(text) &gt; 0: return 0 point = pymupdf.Point(point) try: maxcode = max([ord(c) for c in " ".join(text)]) except Exception: pymupdf.exception_info() return 0 # ensure valid 'fontname' fname = fontname if fname.startswith("/"): fname = fname[1:] xref = self.page.insert_font( fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple ) fontinfo = pymupdf.CheckFontInfo(self.doc, xref) fontdict = fontinfo[1] ordering = fontdict["ordering"] simple = fontdict["simple"] bfname = fontdict["name"] ascender = fontdict["ascender"] descender = fontdict["descender"] if lineheight: lheight = fontsize * lineheight elif ascender - descender &lt;= 1: lheight = fontsize * 1.2 else: lheight = fontsize * (ascender - descender) if maxcode &gt; 255: glyphs = self.doc.get_char_widths(xref, maxcode + 1) else: glyphs = fontdict["glyphs"] tab = [] for t in text: if simple and bfname not in ("Symbol", "ZapfDingbats"): g = None else: g = glyphs tab.append(pymupdf.getTJstr(t, g, simple, ordering)) text = tab color_str = pymupdf.ColorCode(color, "c") fill_str = pymupdf.ColorCode(fill, "f") if not fill and render_mode == 0: # ensure fill color when 0 Tr fill = color fill_str = pymupdf.ColorCode(color, "f") morphing = pymupdf.CheckMorph(morph) rot = rotate if rot % 90 != 0: &gt; raise ValueError("bad rotate value") E ValueError: bad rotate value C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3631: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002A99E437E60&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002A99D4D8080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2335/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pymupdf.utils.Shape object at 0x000002A99E90E8A0&gt; point = Point(72.0, 72.0) buffer = 'Intended for: unit-test-recipient\nDo not disclose' def insert_text( self, point: point_like, buffer: typing.Union[str, list], *, fontsize: float = 11, lineheight: OptFloat = None, fontname: str = "helv", fontfile: OptStr = None, set_simple: bool = 0, encoding: int = 0, color: OptSeq = None, fill: OptSeq = None, render_mode: int = 0, border_width: float = 0.05, miter_limit: float = 1, rotate: int = 0, morph: OptSeq = None, stroke_opacity: float = 1, fill_opacity: float = 1, oc: int = 0, ) -&gt; int: # ensure 'text' is a list of strings, worth dealing with if not bool(buffer): return 0 if type(buffer) not in (list, tuple): text = buffer.splitlines() else: text = buffer if not len(text) &gt; 0: return 0 point = pymupdf.Point(point) try: maxcode = max([ord(c) for c in " ".join(text)]) except Exception: pymupdf.exception_info() return 0 # ensure valid 'fontname' fname = fontname if fname.startswith("/"): fname = fname[1:] xref = self.page.insert_font( fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple ) fontinfo = pymupdf.CheckFontInfo(self.doc, xref) fontdict = fontinfo[1] ordering = fontdict["ordering"] simple = fontdict["simple"] bfname = fontdict["name"] ascender = fontdict["ascender"] descender = fontdict["descender"] if lineheight: lheight = fontsize * lineheight elif ascender - descender &lt;= 1: lheight = fontsize * 1.2 else: lheight = fontsize * (ascender - descender) if maxcode &gt; 255: glyphs = self.doc.get_char_widths(xref, maxcode + 1) else: glyphs = fontdict["glyphs"] tab = [] for t in text: if simple and bfname not in ("Symbol", "ZapfDingbats"): g = None else: g = glyphs tab.append(pymupdf.getTJstr(t, g, simple, ordering)) text = tab color_str = pymupdf.ColorCode(color, "c") fill_str = pymupdf.ColorCode(fill, "f") if not fill and render_mode == 0: # ensure fill color when 0 Tr fill = color fill_str = pymupdf.ColorCode(color, "f") morphing = pymupdf.CheckMorph(morph) rot = rotate if rot % 90 != 0: &gt; raise ValueError("bad rotate value") E ValueError: bad rotate value C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3631: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 22.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2038"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2038_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2038_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2038_1"><button class="btn btn-outline-success"><span class="job_id">2038 : Job ID 5c704e7ff5e1414b952b6833e06d0dee</span></button></div></a><div aria-labelledby="job_list___sub_heading_2038_1" data-parent="#job_list___sub_accordion_2038" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2038_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=45" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (45, 23), end pos: (45, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -42,7 +42,7 @@ (72, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, - rotate=0, + rotate= -1, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True,</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: bad rotate value _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000223E6ACB620&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000223E3DE3170&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pymupdf.utils.Shape object at 0x00000223E6B704D0&gt; point = Point(72.0, 72.0) buffer = 'Intended for: unit-test-recipient\nDo not disclose' def insert_text( self, point: point_like, buffer: typing.Union[str, list], *, fontsize: float = 11, lineheight: OptFloat = None, fontname: str = "helv", fontfile: OptStr = None, set_simple: bool = 0, encoding: int = 0, color: OptSeq = None, fill: OptSeq = None, render_mode: int = 0, border_width: float = 0.05, miter_limit: float = 1, rotate: int = 0, morph: OptSeq = None, stroke_opacity: float = 1, fill_opacity: float = 1, oc: int = 0, ) -&gt; int: # ensure 'text' is a list of strings, worth dealing with if not bool(buffer): return 0 if type(buffer) not in (list, tuple): text = buffer.splitlines() else: text = buffer if not len(text) &gt; 0: return 0 point = pymupdf.Point(point) try: maxcode = max([ord(c) for c in " ".join(text)]) except Exception: pymupdf.exception_info() return 0 # ensure valid 'fontname' fname = fontname if fname.startswith("/"): fname = fname[1:] xref = self.page.insert_font( fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple ) fontinfo = pymupdf.CheckFontInfo(self.doc, xref) fontdict = fontinfo[1] ordering = fontdict["ordering"] simple = fontdict["simple"] bfname = fontdict["name"] ascender = fontdict["ascender"] descender = fontdict["descender"] if lineheight: lheight = fontsize * lineheight elif ascender - descender &lt;= 1: lheight = fontsize * 1.2 else: lheight = fontsize * (ascender - descender) if maxcode &gt; 255: glyphs = self.doc.get_char_widths(xref, maxcode + 1) else: glyphs = fontdict["glyphs"] tab = [] for t in text: if simple and bfname not in ("Symbol", "ZapfDingbats"): g = None else: g = glyphs tab.append(pymupdf.getTJstr(t, g, simple, ordering)) text = tab color_str = pymupdf.ColorCode(color, "c") fill_str = pymupdf.ColorCode(fill, "f") if not fill and render_mode == 0: # ensure fill color when 0 Tr fill = color fill_str = pymupdf.ColorCode(color, "f") morphing = pymupdf.CheckMorph(morph) rot = rotate if rot % 90 != 0: &gt; raise ValueError("bad rotate value") E ValueError: bad rotate value C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3631: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000223E6ACBB90&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000223E3DE3170&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2038/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pymupdf.utils.Shape object at 0x00000223E6B60EF0&gt; point = Point(72.0, 72.0) buffer = 'Intended for: unit-test-recipient\nDo not disclose' def insert_text( self, point: point_like, buffer: typing.Union[str, list], *, fontsize: float = 11, lineheight: OptFloat = None, fontname: str = "helv", fontfile: OptStr = None, set_simple: bool = 0, encoding: int = 0, color: OptSeq = None, fill: OptSeq = None, render_mode: int = 0, border_width: float = 0.05, miter_limit: float = 1, rotate: int = 0, morph: OptSeq = None, stroke_opacity: float = 1, fill_opacity: float = 1, oc: int = 0, ) -&gt; int: # ensure 'text' is a list of strings, worth dealing with if not bool(buffer): return 0 if type(buffer) not in (list, tuple): text = buffer.splitlines() else: text = buffer if not len(text) &gt; 0: return 0 point = pymupdf.Point(point) try: maxcode = max([ord(c) for c in " ".join(text)]) except Exception: pymupdf.exception_info() return 0 # ensure valid 'fontname' fname = fontname if fname.startswith("/"): fname = fname[1:] xref = self.page.insert_font( fontname=fname, fontfile=fontfile, encoding=encoding, set_simple=set_simple ) fontinfo = pymupdf.CheckFontInfo(self.doc, xref) fontdict = fontinfo[1] ordering = fontdict["ordering"] simple = fontdict["simple"] bfname = fontdict["name"] ascender = fontdict["ascender"] descender = fontdict["descender"] if lineheight: lheight = fontsize * lineheight elif ascender - descender &lt;= 1: lheight = fontsize * 1.2 else: lheight = fontsize * (ascender - descender) if maxcode &gt; 255: glyphs = self.doc.get_char_widths(xref, maxcode + 1) else: glyphs = fontdict["glyphs"] tab = [] for t in text: if simple and bfname not in ("Symbol", "ZapfDingbats"): g = None else: g = glyphs tab.append(pymupdf.getTJstr(t, g, simple, ordering)) text = tab color_str = pymupdf.ColorCode(color, "c") fill_str = pymupdf.ColorCode(fill, "f") if not fill and render_mode == 0: # ensure fill color when 0 Tr fill = color fill_str = pymupdf.ColorCode(color, "f") morphing = pymupdf.CheckMorph(morph) rot = rotate if rot % 90 != 0: &gt; raise ValueError("bad rotate value") E ValueError: bad rotate value C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3631: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2039"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2039_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2039_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2039_1"><button class="btn btn-outline-success"><span class="job_id">2039 : Job ID 98dbaf2db0964a4fa28af7d4eda95563</span></button></div></a><div aria-labelledby="job_list___sub_heading_2039_1" data-parent="#job_list___sub_accordion_2039" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2039_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 22), end pos: (46, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=( 1.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000025794FC7740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000025793FE4050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (1.6, 0.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000025794FC7CB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000025793FE4050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-285/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (1.6, 0.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2040"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2040_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2040_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2040_1"><button class="btn btn-outline-success"><span class="job_id">2040 : Job ID a201924dbf784ac6aa9ad0c02aea6e79</span></button></div></a><div aria-labelledby="job_list___sub_heading_2040_1" data-parent="#job_list___sub_accordion_2040" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2040_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 22), end pos: (46, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=( -0.4, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111855645363Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T111856574082Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022E18607680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022E17518FE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (-0.4, 0.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022E18607BF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022E17518FE0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-291/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (-0.4, 0.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 12 failed, 30 passed, 23 warnings in 21.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2041"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2041_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2041_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2041_1"><button class="btn btn-outline-success"><span class="job_id">2041 : Job ID f28517256fbb4a479ac55c4c95c9121d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2041_1" data-parent="#job_list___sub_accordion_2041" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2041_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 27), end pos: (46, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=(0.6, 1.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000160824477D0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000160812CE510&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 1.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016082447D40&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000160812CE510&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1339/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 1.6, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 22.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2042"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2042_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2042_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2042_1"><button class="btn btn-outline-success"><span class="job_id">2042 : Job ID 4356d0080acb4348a12bb4625d471266</span></button></div></a><div aria-labelledby="job_list___sub_heading_2042_1" data-parent="#job_list___sub_accordion_2042" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2042_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 27), end pos: (46, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=(0.6, -0.4, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019D3B5CB380&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000019D389AAB40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, -0.4, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019D3B5CB8F0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000019D389AAB40&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2230/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, -0.4, 0.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 22.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2043"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2043_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2043_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2043_1"><button class="btn btn-outline-success"><span class="job_id">2043 : Job ID 35ab871efbe041718bf43f4f8b46f859</span></button></div></a><div aria-labelledby="job_list___sub_heading_2043_1" data-parent="#job_list___sub_accordion_2043" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2043_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 32), end pos: (46, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=(0.6, 0.6, 1.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002098644B4D0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002098535CE90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 0.6, 1.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002098644BA40&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002098535CE90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-602/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 0.6, 1.6) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 22.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2044"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2044_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2044_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2044_1"><button class="btn btn-outline-success"><span class="job_id">2044 : Job ID 8f256d370a274d83bf21b1f43965d70c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2044_1" data-parent="#job_list___sub_accordion_2044" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2044_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=46" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (46, 32), end pos: (46, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -43,7 +43,7 @@ visible_watermark, fontsize=18, rotate=0, - fill=(0.6, 0.6, 0.6), # fill color (gray) + fill=(0.6, 0.6, -0.4), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000216CF4AB680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000216CC9E7140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 0.6, -0.4) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000216CF4ABBF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000216CC9E7140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2391/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3623: in insert_text fill_str = pymupdf.ColorCode(fill, "f") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0.6, 0.6, -0.4) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 22.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2045"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2045_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2045_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2045_1"><button class="btn btn-outline-danger"><span class="job_id">2045 : Job ID e99f421743fc45b0858f320bae57201b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2045_1" data-parent="#job_list___sub_accordion_2045" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2045_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 23), end pos: (47, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=( 1, 0, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2046"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2046_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2046_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2046_1"><button class="btn btn-outline-success"><span class="job_id">2046 : Job ID 4658a2199e5b4b18803035964346b141</span></button></div></a><div aria-labelledby="job_list___sub_heading_2046_1" data-parent="#job_list___sub_accordion_2046" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2046_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 23), end pos: (47, 24)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=( -1, 0, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BA532AB200&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BA521BCC50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (-1, 0, 0) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BA532AB770&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001BA521BCC50&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1705/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (-1, 0, 0) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2047"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2047_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2047_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2047_1"><button class="btn btn-outline-danger"><span class="job_id">2047 : Job ID 83b4212375fd4abf965de379d511ef16</span></button></div></a><div aria-labelledby="job_list___sub_heading_2047_1" data-parent="#job_list___sub_accordion_2047" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2047_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 26), end pos: (47, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=(0, 1, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2048"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2048_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2048_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2048_1"><button class="btn btn-outline-success"><span class="job_id">2048 : Job ID f6633de798db4652aeeb30d0e4f37d7a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2048_1" data-parent="#job_list___sub_accordion_2048" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2048_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 26), end pos: (47, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=(0, -1, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: need 1, 3 or 4 color components in range 0 to 1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021C19FB7650&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021C16D2E150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0, -1, 0) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021C19FB7BC0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021C16D2E150&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2174/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0, -1, 0) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2049"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2049_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2049_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2049_1"><button class="btn btn-outline-danger"><span class="job_id">2049 : Job ID ad890246851744f98f7aea396fa557b9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2049_1" data-parent="#job_list___sub_accordion_2049" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2049_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 29), end pos: (47, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=(0, 0, 1), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2050"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2050_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2050_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2050_1"><button class="btn btn-outline-success"><span class="job_id">2050 : Job ID 2e1ce8d705754f17bbc2b5582a9a8000</span></button></div></a><div aria-labelledby="job_list___sub_heading_2050_1" data-parent="#job_list___sub_accordion_2050" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2050_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=47" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (47, 29), end pos: (47, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -44,7 +44,7 @@ fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) - color=(0, 0, 0), + color=(0, 0, -1), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233332275062Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233333101741Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B6022575C0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B67F702F00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0, 0, -1) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B602257B30&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B67F702F00&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2282/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( structural_and_overlay_watermark.py:41: in visible_watermark page.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:2351: in insert_text rc = img.insert_text( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\utils.py:3622: in insert_text color_str = pymupdf.ColorCode(color, "c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17552: in ColorCode CheckColor(c) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c = (0, 0, -1) def CheckColor(c: OptSeq): if c: if ( type(c) not in (list, tuple) or len(c) not in (1, 3, 4) or min(c) &lt; 0 or max(c) &gt; 1 ): &gt; raise ValueError("need 1, 3 or 4 color components in range 0 to 1") E ValueError: need 1, 3 or 4 color components in range 0 to 1 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pymupdf\__init__.py:17472: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 10 failed, 32 passed, 23 warnings in 21.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2051"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2051_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2051_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2051_1"><button class="btn btn-outline-danger"><span class="job_id">2051 : Job ID 751711e1040f477583e780c91f3627b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2051_1" data-parent="#job_list___sub_accordion_2051" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2051_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (49, 28), end pos: (49, 29)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -46,7 +46,7 @@ fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, - render_mode=2, # stroke + fill + render_mode= 3, # stroke + fill fill_opacity=0.5, stroke_opacity=0.5, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2052"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2052_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2052_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2052_1"><button class="btn btn-outline-danger"><span class="job_id">2052 : Job ID 5bfa51511a1542b79a619d00c576b3a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2052_1" data-parent="#job_list___sub_accordion_2052" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2052_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (49, 28), end pos: (49, 29)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -46,7 +46,7 @@ fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, - render_mode=2, # stroke + fill + render_mode= 1, # stroke + fill fill_opacity=0.5, stroke_opacity=0.5, )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2053"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2053_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2053_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2053_1"><button class="btn btn-outline-danger"><span class="job_id">2053 : Job ID 720c99f8504349ec9d79b3ccd5d73a7e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2053_1" data-parent="#job_list___sub_accordion_2053" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2053_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=50" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (50, 29), end pos: (50, 32)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -47,7 +47,7 @@ color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill - fill_opacity=0.5, + fill_opacity= 1.5, stroke_opacity=0.5, ) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2054"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2054_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2054_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2054_1"><button class="btn btn-outline-danger"><span class="job_id">2054 : Job ID 47399cd7c762422f942b65dd5079eb14</span></button></div></a><div aria-labelledby="job_list___sub_heading_2054_1" data-parent="#job_list___sub_accordion_2054" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2054_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=50" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (50, 29), end pos: (50, 32)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -47,7 +47,7 @@ color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill - fill_opacity=0.5, + fill_opacity= -0.5, stroke_opacity=0.5, ) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2055"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2055_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2055_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2055_1"><button class="btn btn-outline-danger"><span class="job_id">2055 : Job ID 4806fcdf30a34c39916262580c2e1856</span></button></div></a><div aria-labelledby="job_list___sub_heading_2055_1" data-parent="#job_list___sub_accordion_2055" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2055_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=51" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (51, 31), end pos: (51, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -48,7 +48,7 @@ overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5, - stroke_opacity=0.5, + stroke_opacity= 1.5, ) output_stream = BytesIO()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2056"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2056_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2056_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2056_1"><button class="btn btn-outline-danger"><span class="job_id">2056 : Job ID 726ad01dadcd45dcbbaa3a0c848f0055</span></button></div></a><div aria-labelledby="job_list___sub_heading_2056_1" data-parent="#job_list___sub_accordion_2056" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2056_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=51" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (51, 31), end pos: (51, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -48,7 +48,7 @@ overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5, - stroke_opacity=0.5, + stroke_opacity= -0.5, ) output_stream = BytesIO()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2057"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2057_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2057_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2057_1"><button class="btn btn-outline-danger"><span class="job_id">2057 : Job ID 47d7ba1385d64b51a577ef043755016d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2057_1" data-parent="#job_list___sub_accordion_2057" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2057_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=57" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (57, 27), end pos: (57, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -54,7 +54,7 @@ output_stream = BytesIO() doc.save(output_stream) doc.close() - output_stream.seek(0) + output_stream.seek( 1) return output_stream.read() @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2058"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2058_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2058_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2058_1"><button class="btn btn-outline-success"><span class="job_id">2058 : Job ID eb2f7416d4b04a7993821595ae8d8f86</span></button></div></a><div aria-labelledby="job_list___sub_heading_2058_1" data-parent="#job_list___sub_accordion_2058" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2058_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=57" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (57, 27), end pos: (57, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -54,7 +54,7 @@ output_stream = BytesIO() doc.save(output_stream) doc.close() - output_stream.seek(0) + output_stream.seek( -1) return output_stream.read() @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: negative seek value -1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024A49A87800&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024A4890F710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n' visible_watermark = 'Intended for: unit-test-recipient\nDo not disclose' @staticmethod def visible_watermark(pdf_bytes: bytes, visible_watermark: str): """ Applies a visible watermark to each page of a PDF (in-memory). Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) doc = fitz.open(stream=input_stream, filetype="pdf") for page in doc: page.insert_text( (72, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5, stroke_opacity=0.5, ) output_stream = BytesIO() doc.save(output_stream) doc.close() &gt; output_stream.seek( -1) E ValueError: negative seek value -1 structural_and_overlay_watermark.py:57: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024A49A87D70&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000024A4890F710&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-495/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:101: in add_watermark visibly_watermarked = self.visible_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n' visible_watermark = 'Intended for: unit-test-recipient\nDo not disclose' @staticmethod def visible_watermark(pdf_bytes: bytes, visible_watermark: str): """ Applies a visible watermark to each page of a PDF (in-memory). Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) doc = fitz.open(stream=input_stream, filetype="pdf") for page in doc: page.insert_text( (72, 72), # Top-left corner (x, y) visible_watermark, fontsize=18, rotate=0, fill=(0.6, 0.6, 0.6), # fill color (gray) color=(0, 0, 0), overlay=True, render_mode=2, # stroke + fill fill_opacity=0.5, stroke_opacity=0.5, ) output_stream = BytesIO() doc.save(output_stream) doc.close() &gt; output_stream.seek( -1) E ValueError: negative seek value -1 structural_and_overlay_watermark.py:57: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2059"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2059_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2059_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2059_1"><button class="btn btn-outline-success"><span class="job_id">2059 : Job ID 5862f2ee7829479caa129b3bc0358e3a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2059_1" data-parent="#job_list___sub_accordion_2059" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2059_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (84, 27), end pos: (84, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -81,7 +81,7 @@ output_stream = BytesIO() writer.write(output_stream) - output_stream.seek(0) + output_stream.seek( 1) return output_stream.read() def add_watermark(</pre></div><div class="alert alert-secondary"><pre class="diff">...................F..F................... [100%] ================================== FAILURES =================================== _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022DBE527890&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022DBD44D0A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) &gt; assert out_bytes.startswith(b"%PDF-"), ( # nosec B101 f"{method_name}: output should still look like a PDF" ) E AssertionError: overlay-watermark: output should still look like a PDF E assert False E + where False = &lt;built-in method startswith of bytes object at 0x0000022DBCA21380&gt;(b'%PDF-') E + where &lt;built-in method startswith of bytes object at 0x0000022DBCA21380&gt; = b'PDF-1.5\n%\xe2\xe3\xcf\xd3\n1 0 obj\n&lt;&lt;\n/Type /Pages\n/Count 2\n/Kids [ 4 0 R 20 0 R ]\n&gt;&gt;\nendobj\n2 0 obj\n&lt;&lt;\n/P...00038457 00000 n \n0000038510 00000 n \ntrailer\n&lt;&lt;\n/Size 25\n/Root 3 0 R\n/Info 2 0 R\n&gt;&gt;\nstartxref\n38754\n%%EOF\n'.startswith ..\test\test_watermarking_all_methods.py:100: AssertionError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022DBE527E00&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000022DBD44D0A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1013/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:144: in read_secret pdf_bytes = load_pdf_bytes(pdf) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1013/test_read_secret_roundtrip_ove0/overlay-watermark_watermarked.pdf') def load_pdf_bytes(src: PdfSource) -&gt; bytes: """Normalize a :class:`PdfSource` into raw ``bytes``. Parameters ---------- src: The PDF input. Can be raw bytes, an open binary file handle, or a filesystem path (``str``/``PathLike``). Returns ------- bytes The full contents of the PDF as a byte string. Raises ------ FileNotFoundError If ``src`` is a path that does not exist. ValueError If the resolved bytes do not appear to be a PDF file. """ if isinstance(src, bytes | bytearray): data = bytes(src) elif isinstance(src, str | os.PathLike): with open(os.fspath(src), "rb") as fh: data = fh.read() elif hasattr(src, "read"): # Treat as a binary file-like (IO[bytes]) data = src.read() # type: ignore[attr-defined] else: raise TypeError("Unsupported PdfSource; expected bytes, path, or binary IO") if not is_pdf_bytes(data): &gt; raise ValueError("Input does not look like a valid PDF (missing %PDF header)") E ValueError: Input does not look like a valid PDF (missing %PDF header) watermarking_method.py:110: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 2 failed, 40 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2060"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2060_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2060_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2060_1"><button class="btn btn-outline-success"><span class="job_id">2060 : Job ID 3ccbb2cc9a8740d3b75cbd4074818afc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2060_1" data-parent="#job_list___sub_accordion_2060" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2060_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (84, 27), end pos: (84, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -81,7 +81,7 @@ output_stream = BytesIO() writer.write(output_stream) - output_stream.seek(0) + output_stream.seek( -1) return output_stream.read() def add_watermark(</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: negative seek value -1 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002537DE2B530&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002537CD4CF20&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:116: in add_watermark fully_watermarked = self.structural_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Page/Parent 7 0 R/Resources 19 0 R/MediaBox[0 0 595.30398 841.8898]/... 0 R/Root 20 0 R/ID[&lt;131B47C29D42EE0998F8FBFA411127C3&gt;&lt;A7627D37068731C5AF407E6D213A7DD6&gt;]&gt;&gt;\nstartxref\n38616\n%%EOF\n' hidden_data = 'gAAAAABo8npn2PLU6xZMV37RLIYxg9xgEIdwMk-gavHcmxQFR5PNvdQD4p_AfeueLCigRMepcb_lfqQV_jhOd7JLYkGYrji9bAr-IullvvatZB5xjYxWOg8=' @staticmethod def structural_watermark(pdf_bytes: bytes, hidden_data: str) -&gt; bytes: """ Adds a hidden structural watermark to the PDF (in-memory). Embeds hidden data in each page's dictionary. Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) reader = PdfReader(input_stream) writer = PdfWriter() # Creating an incospicuous location to hide the watermark. # Adding in /PieceInfo (app. specific metadata) # Obfuscated name makes it less obvious than "/Watermark" obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: piece_info = page.get("/PieceInfo") or DictionaryObject() piece_info.update({obfuscated_key: create_string_object(hidden_data)}) page[NameObject("/PieceInfo")] = piece_info writer.add_page(page) output_stream = BytesIO() writer.write(output_stream) &gt; output_stream.seek( -1) E ValueError: negative seek value -1 structural_and_overlay_watermark.py:84: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002537DE2BAA0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002537CD4CF20&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1266/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:116: in add_watermark fully_watermarked = self.structural_watermark( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pdf_bytes = b'%PDF-1.5\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Page/Parent 7 0 R/Resources 19 0 R/MediaBox[0 0 595.30398 841.8898]/... 0 R/Root 20 0 R/ID[&lt;131B47C29D42EE0998F8FBFA411127C3&gt;&lt;6E775B2F6F34C49C0A2CAFEF185E1E71&gt;]&gt;&gt;\nstartxref\n38616\n%%EOF\n' hidden_data = 'gAAAAABo8npnRHmaatS77gs39qVwsOwwqtEd1wuKQ5WDr7sQkgarr8J_i_yYdu8xNJEtb-LRIyWu-BbXYulpaNIVTC5jaGXENTZgv4NwIOkU2YdPrVMIpBU=' @staticmethod def structural_watermark(pdf_bytes: bytes, hidden_data: str) -&gt; bytes: """ Adds a hidden structural watermark to the PDF (in-memory). Embeds hidden data in each page's dictionary. Returns the updated PDF as bytes. """ input_stream = BytesIO(pdf_bytes) reader = PdfReader(input_stream) writer = PdfWriter() # Creating an incospicuous location to hide the watermark. # Adding in /PieceInfo (app. specific metadata) # Obfuscated name makes it less obvious than "/Watermark" obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: piece_info = page.get("/PieceInfo") or DictionaryObject() piece_info.update({obfuscated_key: create_string_object(hidden_data)}) page[NameObject("/PieceInfo")] = piece_info writer.add_page(page) output_stream = BytesIO() writer.write(output_stream) &gt; output_stream.seek( -1) E ValueError: negative seek value -1 structural_and_overlay_watermark.py:84: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2061"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2061_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2061_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2061_1"><button class="btn btn-outline-success"><span class="job_id">2061 : Job ID 439c4f704b8c469fbf823b365806d263</span></button></div></a><div aria-labelledby="job_list___sub_heading_2061_1" data-parent="#job_list___sub_accordion_2061" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2061_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=136" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (136, 19), end pos: (136, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -133,7 +133,7 @@ """ kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, + length= 33, salt=b"try_and_break_me", iterations=200_000, backend=default_backend(),</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Fernet key must be 32 url-safe base64-encoded bytes. _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002C4BA19B650&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002C4B92340B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:114: in add_watermark fernet = Fernet(derived_key) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.fernet.Fernet object at 0x000002C4BA449AC0&gt; key = b'(i\xaa\xf9Cn\xb4\xb0~\x04\x1c\x94L\xfeV\xf8\x05X\x18\x81\x133\x1c\xec\xbd\x06QzF\x839\xd0@' backend = None def __init__( self, key: bytes | str, backend: typing.Any = None, ) -&gt; None: try: key = base64.urlsafe_b64decode(key) except binascii.Error as exc: raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) from exc if len(key) != 32: &gt; raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) E ValueError: Fernet key must be 32 url-safe base64-encoded bytes. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\fernet.py:41: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002C4BA19BBC0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002C4B92340B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2457/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:114: in add_watermark fernet = Fernet(derived_key) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.fernet.Fernet object at 0x000002C4BA6229F0&gt; key = b'(i\xaa\xf9Cn\xb4\xb0~\x04\x1c\x94L\xfeV\xf8\x05X\x18\x81\x133\x1c\xec\xbd\x06QzF\x839\xd0@' backend = None def __init__( self, key: bytes | str, backend: typing.Any = None, ) -&gt; None: try: key = base64.urlsafe_b64decode(key) except binascii.Error as exc: raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) from exc if len(key) != 32: &gt; raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) E ValueError: Fernet key must be 32 url-safe base64-encoded bytes. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\fernet.py:41: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2062"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2062_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2062_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2062_1"><button class="btn btn-outline-success"><span class="job_id">2062 : Job ID d2b29d5b37dc4d9f960115111620af1e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2062_1" data-parent="#job_list___sub_accordion_2062" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2062_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=136" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (136, 19), end pos: (136, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -133,7 +133,7 @@ """ kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, + length= 31, salt=b"try_and_break_me", iterations=200_000, backend=default_backend(),</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: Fernet key must be 32 url-safe base64-encoded bytes. _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FAD8647680&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001FAD75793D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:114: in add_watermark fernet = Fernet(derived_key) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.fernet.Fernet object at 0x000001FAD8ADE780&gt; key = b'(i\xaa\xf9Cn\xb4\xb0~\x04\x1c\x94L\xfeV\xf8\x05X\x18\x81\x133\x1c\xec\xbd\x06QzF\x839' backend = None def __init__( self, key: bytes | str, backend: typing.Any = None, ) -&gt; None: try: key = base64.urlsafe_b64decode(key) except binascii.Error as exc: raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) from exc if len(key) != 32: &gt; raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) E ValueError: Fernet key must be 32 url-safe base64-encoded bytes. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\fernet.py:41: ValueError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001FAD8647BF0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001FAD75793D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-536/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ structural_and_overlay_watermark.py:114: in add_watermark fernet = Fernet(derived_key) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.fernet.Fernet object at 0x000001FAD8647380&gt; key = b'(i\xaa\xf9Cn\xb4\xb0~\x04\x1c\x94L\xfeV\xf8\x05X\x18\x81\x133\x1c\xec\xbd\x06QzF\x839' backend = None def __init__( self, key: bytes | str, backend: typing.Any = None, ) -&gt; None: try: key = base64.urlsafe_b64decode(key) except binascii.Error as exc: raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) from exc if len(key) != 32: &gt; raise ValueError( "Fernet key must be 32 url-safe base64-encoded bytes." ) E ValueError: Fernet key must be 32 url-safe base64-encoded bytes. C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\fernet.py:41: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2063"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2063_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2063_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2063_1"><button class="btn btn-outline-danger"><span class="job_id">2063 : Job ID 04e855c9a8224a9fae566f1e01c26d0c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2063_1" data-parent="#job_list___sub_accordion_2063" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2063_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=138" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (138, 23), end pos: (138, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -135,7 +135,7 @@ algorithm=hashes.SHA256(), length=32, salt=b"try_and_break_me", - iterations=200_000, + iterations= 200001, backend=default_backend(), ) return base64.urlsafe_b64encode(kdf.derive(password.encode()))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2064"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2064_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2064_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2064_1"><button class="btn btn-outline-danger"><span class="job_id">2064 : Job ID 78b5bd99ddf540db908e0357d7567248</span></button></div></a><div aria-labelledby="job_list___sub_heading_2064_1" data-parent="#job_list___sub_accordion_2064" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2064_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=138" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (138, 23), end pos: (138, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -135,7 +135,7 @@ algorithm=hashes.SHA256(), length=32, salt=b"try_and_break_me", - iterations=200_000, + iterations= 199999, backend=default_backend(), ) return base64.urlsafe_b64encode(kdf.derive(password.encode()))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2065"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2065_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2065_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2065_1"><button class="btn btn-outline-danger"><span class="job_id">2065 : Job ID 20c1ad8a8f6b4b2daa48301e344b7c7e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2065_1" data-parent="#job_list___sub_accordion_2065" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2065_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=169" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (169, 34), end pos: (169, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -166,5 +166,5 @@ else: extracted_data.append(None) # No watermark found on this page - return str(extracted_data[0]) + return str(extracted_data[ 1]) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2066"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2066_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2066_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2066_1"><button class="btn btn-outline-danger"><span class="job_id">2066 : Job ID 6ac3455cd6ad40d6aa05b7409d4e67c2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2066_1" data-parent="#job_list___sub_accordion_2066" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2066_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=169" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (169, 34), end pos: (169, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -166,5 +166,5 @@ else: extracted_data.append(None) # No watermark found on this page - return str(extracted_data[0]) + return str(extracted_data[ -1]) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2067"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2067_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2067_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2067_1"><button class="btn btn-outline-success"><span class="job_id">2067 : Job ID a3bcb8ff9e234fcdac9411f25604cfd1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2067_1" data-parent="#job_list___sub_accordion_2067" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2067_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=27" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (27, 4), end pos: (28, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -23,8 +23,6 @@ class StructuralOverlay(WatermarkingMethod): name = "overlay-watermark" - - @staticmethod def get_usage() -&gt; str: return "Method that overlays a visible watermark." </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.FFFFF.............................F [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193211778734Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" &gt; resp = client.get("/api/get-watermarking-methods") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.get("/api/get-watermarking-methods") def get_watermarking_methods(): methods = [] for m in WMUtils.METHODS: methods.append( &gt; {"name": m, "description": WMUtils.get_method(m).get_usage()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: StructuralOverlay.get_usage() takes 0 positional arguments but 1 was given server.py:1137: TypeError _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T193212749741Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _________ TestWatermarkingUtils.test_method_get_usage_returns_string __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x00000181D7AF1F70&gt; def test_method_get_usage_returns_string(self): """Test that all methods return string from get_usage.""" for _name, method in WMUtils.METHODS.items(): &gt; usage = method.get_usage() ^^^^^^^^^^^^^^^^^^ E TypeError: StructuralOverlay.get_usage() takes 0 positional arguments but 1 was given ..\test\test_watermarking_utilities.py:258: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_get_watermarking_methods_route - TypeError: ... FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_method_get_usage_returns_string 10 failed, 32 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2068"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2068_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2068_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2068_1"><button class="btn btn-outline-success"><span class="job_id">2068 : Job ID fadd7b76fe434d79b15ae8c035dfa950</span></button></div></a><div aria-labelledby="job_list___sub_heading_2068_1" data-parent="#job_list___sub_accordion_2068" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2068_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=31" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (31, 4), end pos: (32, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -27,8 +27,6 @@ @staticmethod def get_usage() -&gt; str: return "Method that overlays a visible watermark." - - @staticmethod def visible_watermark(pdf_bytes: bytes, visible_watermark: str): """ Applies a visible watermark to each page of a PDF (in-memory).</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231047712547Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T231048569773Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021748F677D0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021746DB9D90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021746DB9D90&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") &gt; visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) E TypeError: StructuralOverlay.visible_watermark() takes 2 positional arguments but 3 were given structural_and_overlay_watermark.py:99: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000021748F67D40&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021746DB9D90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2224/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000021746DB9D90&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") &gt; visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) E TypeError: StructuralOverlay.visible_watermark() takes 2 positional arguments but 3 were given structural_and_overlay_watermark.py:99: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 10 failed, 32 passed, 23 warnings in 20.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2069"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2069_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2069_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2069_1"><button class="btn btn-outline-success"><span class="job_id">2069 : Job ID aca3159c4b164574882d4f265f3491f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2069_1" data-parent="#job_list___sub_accordion_2069" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2069_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=60" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (60, 4), end pos: (61, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -56,8 +56,6 @@ doc.close() output_stream.seek(0) return output_stream.read() - - @staticmethod def structural_watermark(pdf_bytes: bytes, hidden_data: str) -&gt; bytes: """ Adds a hidden structural watermark to the PDF (in-memory).</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.......F..F................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T155041817351Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T155042670193Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000017183717740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000017180BF3FB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000017180BF3FB0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into # the PDF structure. # Encrypt the secret for extra security derived_key = self.derive_fernet_key(key) fernet = Fernet(derived_key) encrypted_secret = fernet.encrypt(secret.encode()).decode() &gt; fully_watermarked = self.structural_watermark( visibly_watermarked, encrypted_secret ) E TypeError: StructuralOverlay.structural_watermark() takes 2 positional arguments but 3 were given structural_and_overlay_watermark.py:114: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000017183717CB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000017180BF3FB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1029/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000017180BF3FB0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into # the PDF structure. # Encrypt the secret for extra security derived_key = self.derive_fernet_key(key) fernet = Fernet(derived_key) encrypted_secret = fernet.encrypt(secret.encode()).decode() &gt; fully_watermarked = self.structural_watermark( visibly_watermarked, encrypted_secret ) E TypeError: StructuralOverlay.structural_watermark() takes 2 positional arguments but 3 were given structural_and_overlay_watermark.py:114: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 10 failed, 32 passed, 23 warnings in 20.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2070"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2070_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2070_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2070_1"><button class="btn btn-outline-success"><span class="job_id">2070 : Job ID ea4182311c4d4db5a0e9e4e507b953f3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2070_1" data-parent="#job_list___sub_accordion_2070" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2070_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=129" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (129, 4), end pos: (130, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -125,8 +125,6 @@ position: str | None = None, ) -&gt; bool: return True - - @staticmethod def derive_fernet_key(password: str) -&gt; bytes: """ Derive a Fernet-compatible key from a string password using PBKDF2.</pre></div><div class="alert alert-secondary"><pre class="diff">.........F.........F..F................... [100%] ================================== FAILURES =================================== _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests assert resp.status_code == 201 assert resp.is_json #check types assert isinstance(data.get("id"), int) assert isinstance(data.get("documentid"), int) assert isinstance(data.get("link"), str) assert isinstance(data.get("intended_for"), str) assert isinstance(data.get("method"), str) assert isinstance(data.get("position"), str) assert isinstance(data.get("filename"), str) assert isinstance(data.get("size"), int) #check values assert data.get("documentid") == parameters["id"] assert data.get("intended_for") == parameters["intended_for"] assert data.get("method") == parameters["method"] assert data.get("position") == parameters["position"] #Tests with wrong parameters #Test with exact same call: should return database insertion error (Non unique entry) resp = client.post("/api/create-watermark", json=parameters) assert resp.status_code == 503 #Non existant method resp = client.post("/api/create-watermark", json={"method": "watermarkmethod", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Non existant document resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 8}) assert resp.status_code == 404 #Missing id resp = client.post("/api/create-watermark", json={"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"}) assert resp.status_code == 400 #Missing method resp = client.post("/api/create-watermark", json={"position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1}) assert resp.status_code == 400 #Missing position: no issue if method ignores # (NB: must change intended_for or secret etc! Else integrity error.) resp = client.post("/api/create-watermark", json={"method": "overlay-watermark", "key": "key", "secret": "secret", "intended_for":"John", "id": 1}) &gt; assert resp.status_code == 201 E assert 500 == 201 E + where 500 = &lt;WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]&gt;.status_code ..\test\test_api.py:378: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1097 Integrity error during version insert for document 1: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b' for key 'uq_Versions_link'") [SQL: INSERT INTO Versions (documentid, link, intended_for, secret, method, position, path) VALUES (%(documentid)s, %(link)s, %(intended_for)s, %(secret)s, %(method)s, %(position)s, %(path)s) ] [parameters: {'documentid': 1, 'link': 'b844de8060c148285cdf347927f723d01bd81b35ea64b58b7494157eba1a274b', 'intended_for': 'Mickey Mouse', 'secret': 'secret', 'method': 'robust-xmp', 'position': 'metadata-only', 'path': 'C:\\Users\\franc\\Documents\\GitHub\\softsec-tatou\\server\\src\\storage\\files\\username\\watermarks\\My File__Mickey_Mouse.pdf'}] (Background on this error at: https://sqlalche.me/e/20/gkpj) ERROR server:server.py:1007 Watermark applicability check failed for document 1: "Unknown watermarking method: 'watermarkmethod'. Known: ['overlay-watermark', 'robust-xmp', 'signed-annots']" WARNING server:server.py:972 Document not found or access denied for watermarking id=8 WARNING server:server.py:934 Missing document id in request WARNING server:server.py:948 Missing required fields for watermarking: {'id': 1, 'intended_for': 'Mickey Mouse', 'key': 'key', 'position': 'metadata-only', 'secret': 'secret'} ERROR server:server.py:1034 Watermarking failed for document 1 using method overlay-watermark: StructuralOverlay.derive_fernet_key() takes 1 positional argument but 2 were given _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B3224EB740&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B3215840E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B3215840E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into # the PDF structure. # Encrypt the secret for extra security &gt; derived_key = self.derive_fernet_key(key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: StructuralOverlay.derive_fernet_key() takes 1 positional argument but 2 were given structural_and_overlay_watermark.py:113: TypeError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B3224EBCB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B3215840E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1887/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000001B3215840E0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: data = load_pdf_bytes(pdf) # Add a visible watermark. This might confuse the attackers, # suggesting that the only watermark is the visible watermark. # It also works as a deterrent against document diffusion. if not intended_for: raise ValueError("Missing recipient. (intended_for)") visibly_watermarked = self.visible_watermark( data, "Intended for: " + intended_for + "\nDo not disclose" ) if not secret: raise ValueError("Secret must be a non-empty string") if not isinstance(key, str) or not key: raise ValueError("Key must be a non-empty string") # Add the "real" watermark by embedding the secret into # the PDF structure. # Encrypt the secret for extra security &gt; derived_key = self.derive_fernet_key(key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: StructuralOverlay.derive_fernet_key() takes 1 positional argument but 2 were given structural_and_overlay_watermark.py:113: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_watermark_route - assert 500 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 3 failed, 39 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2071"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2071_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2071_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2071_1"><button class="btn btn-outline-success"><span class="job_id">2071 : Job ID 03c53054fc6341b0ac0f4d2ab02ccac0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2071_1" data-parent="#job_list___sub_accordion_2071" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2071_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (40, 20), end pos: (40, 23)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -37,7 +37,7 @@ input_stream = BytesIO(pdf_bytes) doc = fitz.open(stream=input_stream, filetype="pdf") - for page in doc: + for page in []: page.insert_text( (72, 72), # Top-left corner (x, y) visible_watermark,</pre></div><div class="alert alert-secondary"><pre class="diff">...................F...................... [100%] ================================== FAILURES =================================== _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026960ACB5C0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x000002695F9E8F80&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: overlay-watermark: watermarked bytes should not be smaller than input E assert 38277 &gt;= 38471 E + where 38277 = len(b'%PDF-1.5\n%\xe2\xe3\xcf\xd3\n1 0 obj\n&lt;&lt;\n/Type /Pages\n/Count 2\n/Kids [ 4 0 R 16 0 R ]\n&gt;&gt;\nendobj\n2 0 obj\n&lt;&lt;\n/...00037334 00000 n \n0000037674 00000 n \ntrailer\n&lt;&lt;\n/Size 18\n/Root 3 0 R\n/Info 2 0 R\n&gt;&gt;\nstartxref\n37838\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] 1 failed, 41 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2072"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2072_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2072_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2072_1"><button class="btn btn-outline-success"><span class="job_id">2072 : Job ID f861286829fc4dcbb83c6843edf5f189</span></button></div></a><div aria-labelledby="job_list___sub_heading_2072_1" data-parent="#job_list___sub_accordion_2072" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2072_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=76" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (76, 20), end pos: (76, 32)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -73,7 +73,7 @@ # Obfuscated name makes it less obvious than "/Watermark" obfuscated_key = NameObject("/XObjD5fA2e1") - for page in reader.pages: + for page in []: piece_info = page.get("/PieceInfo") or DictionaryObject() piece_info.update({obfuscated_key: create_string_object(hidden_data)}) page[NameObject("/PieceInfo")] = piece_info</pre></div><div class="alert alert-secondary"><pre class="diff">...................F..F................... [100%] ================================== FAILURES =================================== _ TestAllWatermarkingMethods.test_add_watermark_and_shape[overlay-watermark] __ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001917672B440&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000019172830B90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: overlay-watermark: watermarked bytes should not be smaller than input E assert 312 &gt;= 38471 E + where 312 = len(b'%PDF-1.3\n%\xe2\xe3\xcf\xd3\n1 0 obj\n&lt;&lt;\n/Type /Pages\n/Count 0\n/Kids [ ]\n&gt;&gt;\nendobj\n2 0 obj\n&lt;&lt;\n/Producer (PyP...n0000000068 00000 n \n0000000108 00000 n \ntrailer\n&lt;&lt;\n/Size 4\n/Root 3 0 R\n/Info 2 0 R\n&gt;&gt;\nstartxref\n157\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001917672B9B0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000019172830B90&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1091/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x0000019172830B90&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1091/test_read_secret_roundtrip_ove0/overlay-watermark_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: pdf_bytes = load_pdf_bytes(pdf) reader = PdfReader(BytesIO(pdf_bytes)) extracted_data = [] obfuscated_key = NameObject("/XObjD5fA2e1") for page in reader.pages: # Check for our custom structural watermark watermark_obj = page.get("/PieceInfo") if watermark_obj and obfuscated_key in watermark_obj: hidden = watermark_obj[obfuscated_key] # Extract string encrypted_str = str(hidden) # Try decryption, catch exceptions try: derived_key = self.derive_fernet_key(key) fernet = Fernet(derived_key) decrypted = fernet.decrypt(encrypted_str.encode()).decode() extracted_data.append(decrypted) except InvalidToken as e: raise InvalidKeyError("Failed to decrypt watermark") from e else: extracted_data.append(None) # No watermark found on this page &gt; return str(extracted_data[0]) ^^^^^^^^^^^^^^^^^ E IndexError: list index out of range structural_and_overlay_watermark.py:169: IndexError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[overlay-watermark] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 2 failed, 40 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2073"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2073_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2073_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2073_1"><button class="btn btn-outline-success"><span class="job_id">2073 : Job ID a0e9cf4fdf654b5cbd05ef321e359903</span></button></div></a><div aria-labelledby="job_list___sub_heading_2073_1" data-parent="#job_list___sub_accordion_2073" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2073_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=structural_and_overlay_watermark.py&amp;line=150" class="text-secondary"><button class="btn btn-outline-dark">structural_and_overlay_watermark.py, start pos: (150, 20), end pos: (150, 32)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- astructural_and_overlay_watermark.py +++ bstructural_and_overlay_watermark.py @@ -147,7 +147,7 @@ obfuscated_key = NameObject("/XObjD5fA2e1") - for page in reader.pages: + for page in []: # Check for our custom structural watermark watermark_obj = page.get("/PieceInfo") if watermark_obj and obfuscated_key in watermark_obj:</pre></div><div class="alert alert-secondary"><pre class="diff">..........F...........F................... [100%] ================================== FAILURES =================================== __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() assert upload_resp.status_code == 201 assert upload_resp_data.get("id") == 2 #Test the route parameters = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password", "id": 2} parameters_no_id = {"method": "overlay-watermark", "position": "metadata-only", "key": "strong-password"} resp = client.post("/api/read-watermark", json=parameters) #resp = client.post("/api/read-watermark/2", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 400 == 201 E + where 400 = &lt;WrapperTestResponse 52 bytes [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:415: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:1226 Error when attempting to read watermark for document 2: list index out of range __ TestAllWatermarkingMethods.test_read_secret_roundtrip[overlay-watermark] ___ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000262DB667CB0&gt; method_name = 'overlay-watermark' impl = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000262D8B1FE60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1955/test_read_secret_roundtrip_ove0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;structural_and_overlay_watermark.StructuralOverlay object at 0x00000262D8B1FE60&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1955/test_read_secret_roundtrip_ove0/overlay-watermark_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: pdf_bytes = load_pdf_bytes(pdf) reader = PdfReader(BytesIO(pdf_bytes)) extracted_data = [] obfuscated_key = NameObject("/XObjD5fA2e1") for page in []: # Check for our custom structural watermark watermark_obj = page.get("/PieceInfo") if watermark_obj and obfuscated_key in watermark_obj: hidden = watermark_obj[obfuscated_key] # Extract string encrypted_str = str(hidden) # Try decryption, catch exceptions try: derived_key = self.derive_fernet_key(key) fernet = Fernet(derived_key) decrypted = fernet.decrypt(encrypted_str.encode()).decode() extracted_data.append(decrypted) except InvalidToken as e: raise InvalidKeyError("Failed to decrypt watermark") from e else: extracted_data.append(None) # No watermark found on this page &gt; return str(extracted_data[0]) ^^^^^^^^^^^^^^^^^ E IndexError: list index out of range structural_and_overlay_watermark.py:169: IndexError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_read_watermark_route - assert 400 == 201 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[overlay-watermark] 2 failed, 40 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2074"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2074_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2074_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2074_1"><button class="btn btn-outline-danger"><span class="job_id">2074 : Job ID b0d03f89e817461dba1db91fe874b589</span></button></div></a><div aria-labelledby="job_list___sub_heading_2074_1" data-parent="#job_list___sub_accordion_2074" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2074_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root + "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2075"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2075_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2075_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2075_1"><button class="btn btn-outline-danger"><span class="job_id">2075 : Job ID 8520d56cf1b648afb1025e2a77b7c27c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2075_1" data-parent="#job_list___sub_accordion_2075" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2075_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" + "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2076"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2076_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2076_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2076_1"><button class="btn btn-outline-danger"><span class="job_id">2076 : Job ID be4312ee5b5f44b1940b11ba1334fc07</span></button></div></a><div aria-labelledby="job_list___sub_heading_2076_1" data-parent="#job_list___sub_accordion_2076" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2076_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent + "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2077"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2077_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2077_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2077_1"><button class="btn btn-outline-success"><span class="job_id">2077 : Job ID 3c3b5591f9c64e65afdf3122ebb4bd90</span></button></div></a><div aria-labelledby="job_list___sub_heading_2077_1" data-parent="#job_list___sub_accordion_2077" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2077_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent + "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for +: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2078"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2078_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2078_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2078_1"><button class="btn btn-outline-danger"><span class="job_id">2078 : Job ID e4971c30bd1e472ea8a0db75dc8bd373</span></button></div></a><div aria-labelledby="job_list___sub_heading_2078_1" data-parent="#job_list___sub_accordion_2078" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2078_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent + "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2079"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2079_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2079_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2079_1"><button class="btn btn-outline-danger"><span class="job_id">2079 : Job ID 86e2654e505c403f837d16716a50f3a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2079_1" data-parent="#job_list___sub_accordion_2079" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2079_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root - "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2080"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2080_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2080_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2080_1"><button class="btn btn-outline-danger"><span class="job_id">2080 : Job ID 87f8cda4c2bf4c64bac7c43c88272d11</span></button></div></a><div aria-labelledby="job_list___sub_heading_2080_1" data-parent="#job_list___sub_accordion_2080" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2080_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" - "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2081"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2081_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2081_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2081_1"><button class="btn btn-outline-danger"><span class="job_id">2081 : Job ID 04182854e4a14e1b9d2eb10b9b306fad</span></button></div></a><div aria-labelledby="job_list___sub_heading_2081_1" data-parent="#job_list___sub_accordion_2081" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2081_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent - "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2082"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2082_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2082_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2082_1"><button class="btn btn-outline-success"><span class="job_id">2082 : Job ID 196a67818d864329bc97d4605c2a4589</span></button></div></a><div aria-labelledby="job_list___sub_heading_2082_1" data-parent="#job_list___sub_accordion_2082" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2082_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent - "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for -: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2083"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2083_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2083_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2083_1"><button class="btn btn-outline-danger"><span class="job_id">2083 : Job ID 2af99675c4fd42f18d2b4ed9d2959861</span></button></div></a><div aria-labelledby="job_list___sub_heading_2083_1" data-parent="#job_list___sub_accordion_2083" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2083_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent - "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2084"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2084_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2084_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2084_1"><button class="btn btn-outline-danger"><span class="job_id">2084 : Job ID 75d72a0fbe7a44e9b10bc549eedab567</span></button></div></a><div aria-labelledby="job_list___sub_heading_2084_1" data-parent="#job_list___sub_accordion_2084" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2084_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root * "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2085"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2085_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2085_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2085_1"><button class="btn btn-outline-success"><span class="job_id">2085 : Job ID d961d173e4ce4cae8444715a29903def</span></button></div></a><div aria-labelledby="job_list___sub_heading_2085_1" data-parent="#job_list___sub_accordion_2085" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2085_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" * "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114731848161Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T114732737434Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2086"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2086_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2086_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2086_1"><button class="btn btn-outline-danger"><span class="job_id">2086 : Job ID f3af626e716f40a6b57b67b21610aed3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2086_1" data-parent="#job_list___sub_accordion_2086" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2086_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent * "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2087"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2087_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2087_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2087_1"><button class="btn btn-outline-success"><span class="job_id">2087 : Job ID 3b5664233f814715b07daa0af064464f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2087_1" data-parent="#job_list___sub_accordion_2087" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2087_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent * "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): can't multiply sequence by non-int of type 'WindowsPath' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2088"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2088_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2088_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2088_1"><button class="btn btn-outline-danger"><span class="job_id">2088 : Job ID 23fe2ab6e7f340469a0ec749c7a91acc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2088_1" data-parent="#job_list___sub_accordion_2088" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2088_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent * "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2089"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2089_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2089_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2089_1"><button class="btn btn-outline-danger"><span class="job_id">2089 : Job ID a3cb3790a203469d9f58bd77fe98bae4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2089_1" data-parent="#job_list___sub_accordion_2089" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2089_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root // "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2090"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2090_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2090_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2090_1"><button class="btn btn-outline-danger"><span class="job_id">2090 : Job ID 2bedecda194644db89aecca255ff86bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2090_1" data-parent="#job_list___sub_accordion_2090" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2090_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" // "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2091"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2091_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2091_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2091_1"><button class="btn btn-outline-danger"><span class="job_id">2091 : Job ID 00f7b7e9094145ceb7251b8e4a9606e8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2091_1" data-parent="#job_list___sub_accordion_2091" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2091_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent // "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2092"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2092_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2092_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2092_1"><button class="btn btn-outline-success"><span class="job_id">2092 : Job ID 4137e54c5958470f99eed52b44ce37a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2092_1" data-parent="#job_list___sub_accordion_2092" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2092_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent // "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for //: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2093"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2093_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2093_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2093_1"><button class="btn btn-outline-danger"><span class="job_id">2093 : Job ID 18fb5b7016fb4bf49ac171bbd9702673</span></button></div></a><div aria-labelledby="job_list___sub_heading_2093_1" data-parent="#job_list___sub_accordion_2093" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2093_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent // "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2094"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2094_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2094_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2094_1"><button class="btn btn-outline-danger"><span class="job_id">2094 : Job ID 2d80428569d74c5488f8eaf72ed742e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2094_1" data-parent="#job_list___sub_accordion_2094" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2094_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root % "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2095"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2095_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2095_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2095_1"><button class="btn btn-outline-danger"><span class="job_id">2095 : Job ID 8396ba0727204565a2d1a615e6c2a174</span></button></div></a><div aria-labelledby="job_list___sub_heading_2095_1" data-parent="#job_list___sub_accordion_2095" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2095_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" % "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2096"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2096_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2096_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2096_1"><button class="btn btn-outline-success"><span class="job_id">2096 : Job ID 18214dfd235c4c0c91c6e62420f65de3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2096_1" data-parent="#job_list___sub_accordion_2096" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2096_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent % "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T160419801143Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T160420668111Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2097"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2097_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2097_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2097_1"><button class="btn btn-outline-success"><span class="job_id">2097 : Job ID 03e2b86ca910488ab8f778cd3104b564</span></button></div></a><div aria-labelledby="job_list___sub_heading_2097_1" data-parent="#job_list___sub_accordion_2097" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2097_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent % "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145742389415Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145742686850Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for %: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 15.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2098"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2098_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2098_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2098_1"><button class="btn btn-outline-danger"><span class="job_id">2098 : Job ID bdae34bb7dc14220bff2c7a3622f69ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_2098_1" data-parent="#job_list___sub_accordion_2098" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2098_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent % "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2099"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2099_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2099_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2099_1"><button class="btn btn-outline-danger"><span class="job_id">2099 : Job ID 79f62eaa7b84453591bef77eb90c5dde</span></button></div></a><div aria-labelledby="job_list___sub_heading_2099_1" data-parent="#job_list___sub_accordion_2099" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2099_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root ** "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2100"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2100_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2100_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2100_1"><button class="btn btn-outline-danger"><span class="job_id">2100 : Job ID d0079ec5d01e43a99ce3540074bb25a1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2100_1" data-parent="#job_list___sub_accordion_2100" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2100_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" ** "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2101"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2101_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2101_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2101_1"><button class="btn btn-outline-danger"><span class="job_id">2101 : Job ID 9f8050325eae4f4398252a95e386cb51</span></button></div></a><div aria-labelledby="job_list___sub_heading_2101_1" data-parent="#job_list___sub_accordion_2101" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2101_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent ** "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2102"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2102_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2102_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2102_1"><button class="btn btn-outline-success"><span class="job_id">2102 : Job ID 28172e3252e14d6a9fd60b82be24d84c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2102_1" data-parent="#job_list___sub_accordion_2102" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2102_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent ** "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ** or pow(): 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2103"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2103_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2103_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2103_1"><button class="btn btn-outline-danger"><span class="job_id">2103 : Job ID 41858ff744034397a73c3969b8a05b3d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2103_1" data-parent="#job_list___sub_accordion_2103" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2103_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent ** "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2104"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2104_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2104_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2104_1"><button class="btn btn-outline-danger"><span class="job_id">2104 : Job ID 90278cbd825f4411a1ff57cb7a3575a7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2104_1" data-parent="#job_list___sub_accordion_2104" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2104_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root &gt;&gt; "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2105"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2105_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2105_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2105_1"><button class="btn btn-outline-danger"><span class="job_id">2105 : Job ID 48760a16cd934697a3ebe2ecfbf4911d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2105_1" data-parent="#job_list___sub_accordion_2105" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2105_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" &gt;&gt; "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2106"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2106_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2106_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2106_1"><button class="btn btn-outline-danger"><span class="job_id">2106 : Job ID 505ace7edace48d9b2ba7be090689cf2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2106_1" data-parent="#job_list___sub_accordion_2106" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2106_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &gt;&gt; "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2107"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2107_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2107_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2107_1"><button class="btn btn-outline-success"><span class="job_id">2107 : Job ID 8c8c7168445541ce8a2b67166988ff9a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2107_1" data-parent="#job_list___sub_accordion_2107" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2107_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent &gt;&gt; "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &gt;&gt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2108"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2108_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2108_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2108_1"><button class="btn btn-outline-success"><span class="job_id">2108 : Job ID 65530e919c54400b99c7a28ca1d8486b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2108_1" data-parent="#job_list___sub_accordion_2108" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2108_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent &gt;&gt; "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213321330882Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T213322218430Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2109"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2109_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2109_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2109_1"><button class="btn btn-outline-danger"><span class="job_id">2109 : Job ID b94e65930fc24b60966ed33b7b3f2e48</span></button></div></a><div aria-labelledby="job_list___sub_heading_2109_1" data-parent="#job_list___sub_accordion_2109" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2109_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root &lt;&lt; "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2110"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2110_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2110_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2110_1"><button class="btn btn-outline-danger"><span class="job_id">2110 : Job ID 8d291a15588642b780e3aa5f8967c1e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2110_1" data-parent="#job_list___sub_accordion_2110" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2110_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" &lt;&lt; "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2111"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2111_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2111_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2111_1"><button class="btn btn-outline-danger"><span class="job_id">2111 : Job ID c6e0f49ff68941738b90daa837ed1a05</span></button></div></a><div aria-labelledby="job_list___sub_heading_2111_1" data-parent="#job_list___sub_accordion_2111" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2111_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &lt;&lt; "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2112"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2112_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2112_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2112_1"><button class="btn btn-outline-success"><span class="job_id">2112 : Job ID cf11e73118f24f10bb2a5a161d343ec3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2112_1" data-parent="#job_list___sub_accordion_2112" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2112_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent &lt;&lt; "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &lt;&lt;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2113"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2113_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2113_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2113_1"><button class="btn btn-outline-danger"><span class="job_id">2113 : Job ID 869b8dad812d47a6a8d98da8a6971dab</span></button></div></a><div aria-labelledby="job_list___sub_heading_2113_1" data-parent="#job_list___sub_accordion_2113" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2113_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent &lt;&lt; "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2114"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2114_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2114_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2114_1"><button class="btn btn-outline-danger"><span class="job_id">2114 : Job ID f03e736e007440f3b33cda8dbcb0d95f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2114_1" data-parent="#job_list___sub_accordion_2114" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2114_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root | "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2115"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2115_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2115_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2115_1"><button class="btn btn-outline-danger"><span class="job_id">2115 : Job ID 6202a2e3623f41cb8a79de283fb736b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2115_1" data-parent="#job_list___sub_accordion_2115" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2115_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" | "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2116"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2116_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2116_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2116_1"><button class="btn btn-outline-danger"><span class="job_id">2116 : Job ID 72415d95cf0b49439497f4b2e125e52a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2116_1" data-parent="#job_list___sub_accordion_2116" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2116_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent | "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2117"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2117_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2117_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2117_1"><button class="btn btn-outline-success"><span class="job_id">2117 : Job ID 27ceecd901514c4e82ae431663d5b8cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2117_1" data-parent="#job_list___sub_accordion_2117" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2117_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent | "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for |: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2118"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2118_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2118_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2118_1"><button class="btn btn-outline-danger"><span class="job_id">2118 : Job ID 78e5c14321a147359a4fa1b1ceedb40c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2118_1" data-parent="#job_list___sub_accordion_2118" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2118_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitOr, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent | "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2119"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2119_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2119_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2119_1"><button class="btn btn-outline-danger"><span class="job_id">2119 : Job ID 38be08237ac54e52a7fa035c9f7906e6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2119_1" data-parent="#job_list___sub_accordion_2119" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2119_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root &amp; "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2120"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2120_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2120_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2120_1"><button class="btn btn-outline-danger"><span class="job_id">2120 : Job ID 2e89cd5a5f89418f81798c12583c25ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_2120_1" data-parent="#job_list___sub_accordion_2120" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2120_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" &amp; "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2121"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2121_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2121_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2121_1"><button class="btn btn-outline-danger"><span class="job_id">2121 : Job ID c81ed697f64f4c17b71604b4925aaeb6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2121_1" data-parent="#job_list___sub_accordion_2121" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2121_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent &amp; "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2122"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2122_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2122_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2122_1"><button class="btn btn-outline-success"><span class="job_id">2122 : Job ID 231e2008a62b4f86aa40c9b538cb326f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2122_1" data-parent="#job_list___sub_accordion_2122" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2122_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent &amp; "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235117087577Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235117386088Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for &amp;: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 12 failed, 30 passed, 9 warnings in 15.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2123"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2123_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2123_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2123_1"><button class="btn btn-outline-danger"><span class="job_id">2123 : Job ID ed2e685a5c1b40d789ea639a6400555b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2123_1" data-parent="#job_list___sub_accordion_2123" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2123_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent &amp; "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2124"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2124_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2124_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2124_1"><button class="btn btn-outline-danger"><span class="job_id">2124 : Job ID 41e23ddefab84aa58ef8fa245ea20082</span></button></div></a><div aria-labelledby="job_list___sub_heading_2124_1" data-parent="#job_list___sub_accordion_2124" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2124_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 46), end pos: (52, 47)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root ^ "public-keys" / "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.38s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2125"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2125_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2125_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2125_1"><button class="btn btn-outline-danger"><span class="job_id">2125 : Job ID 9183e6dc644f4353b7eab14595e8404f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2125_1" data-parent="#job_list___sub_accordion_2125" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2125_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=52" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (52, 62), end pos: (52, 63)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -49,7 +49,7 @@ if public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent - public_keys_dir = str(server_root / "public-keys" / "pki") + public_keys_dir = str(server_root / "public-keys" ^ "pki") if server_private_key is None: # Default to server_priv.asc in src directory</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2126"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2126_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2126_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2126_1"><button class="btn btn-outline-danger"><span class="job_id">2126 : Job ID 0a075a5f67ff4877a75c27c55f7e15cb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2126_1" data-parent="#job_list___sub_accordion_2126" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2126_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=56" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (56, 59), end pos: (56, 60)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -53,7 +53,7 @@ if server_private_key is None: # Default to server_priv.asc in src directory - server_private_key = str(Path(__file__).parent / "server_priv.asc") + server_private_key = str(Path(__file__).parent ^ "server_priv.asc") # Server public key path (needed for IdentityManager) server_public_key = str(Path(__file__).parent / "server_pub.asc")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2127"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2127_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2127_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2127_1"><button class="btn btn-outline-success"><span class="job_id">2127 : Job ID 0de4a01cc18541189cba1480fc3c700b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2127_1" data-parent="#job_list___sub_accordion_2127" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2127_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (59, 54), end pos: (59, 55)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -56,7 +56,7 @@ server_private_key = str(Path(__file__).parent / "server_priv.asc") # Server public key path (needed for IdentityManager) - server_public_key = str(Path(__file__).parent / "server_pub.asc") + server_public_key = str(Path(__file__).parent ^ "server_pub.asc") # Initialize RMAP components with correct API self.identity_manager = IdentityManager(</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ----------------------------- Captured log setup ------------------------------ WARNING server:server.py:88 RMAP initialization failed (continuing): unsupported operand type(s) for ^: 'WindowsPath' and 'str' ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2128"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2128_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2128_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2128_1"><button class="btn btn-outline-danger"><span class="job_id">2128 : Job ID afaf49329223402d8513fa66ecc637a7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2128_1" data-parent="#job_list___sub_accordion_2128" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2128_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (110, 64), end pos: (110, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Div_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -107,7 +107,7 @@ try: # Load server private key for decryption - server_private_key_path = str(Path(__file__).parent / "server_priv.asc") + server_private_key_path = str(Path(__file__).parent ^ "server_priv.asc") if not Path(server_private_key_path).exists(): return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2129"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2129_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2129_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2129_1"><button class="btn btn-outline-success"><span class="job_id">2129 : Job ID b9238edee5264af68c718bf17beac2d6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2129_1" data-parent="#job_list___sub_accordion_2129" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2129_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str + None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2130"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2130_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2130_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2130_1"><button class="btn btn-outline-success"><span class="job_id">2130 : Job ID 71219d2c2de94bc08cc0b7eff9b0c545</span></button></div></a><div aria-labelledby="job_list___sub_heading_2130_1" data-parent="#job_list___sub_accordion_2130" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2130_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str + None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 16.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2131"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2131_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2131_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2131_1"><button class="btn btn-outline-success"><span class="job_id">2131 : Job ID a1c7c943ea0443eea11701706843b3ac</span></button></div></a><div aria-labelledby="job_list___sub_heading_2131_1" data-parent="#job_list___sub_accordion_2131" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2131_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] + None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2132"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2132_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2132_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2132_1"><button class="btn btn-outline-success"><span class="job_id">2132 : Job ID e594363bdf6d4cb5ad05d27be9d08695</span></button></div></a><div aria-labelledby="job_list___sub_heading_2132_1" data-parent="#job_list___sub_accordion_2132" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2132_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str + None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2133"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2133_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2133_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2133_1"><button class="btn btn-outline-success"><span class="job_id">2133 : Job ID 3505763cc82b4367a217d33779331b3c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2133_1" data-parent="#job_list___sub_accordion_2133" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2133_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] + None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2134"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2134_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2134_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2134_1"><button class="btn btn-outline-success"><span class="job_id">2134 : Job ID f11333d5048f4bd096efe08534f42ee6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2134_1" data-parent="#job_list___sub_accordion_2134" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2134_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str + None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115253058958Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T115253359111Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 15.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2135"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2135_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2135_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2135_1"><button class="btn btn-outline-success"><span class="job_id">2135 : Job ID eb45c1bd75384d00aa47b31137e00aa5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2135_1" data-parent="#job_list___sub_accordion_2135" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2135_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str - None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2136"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2136_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2136_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2136_1"><button class="btn btn-outline-success"><span class="job_id">2136 : Job ID 00148911a7c049e5bb6e15316ef41ad6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2136_1" data-parent="#job_list___sub_accordion_2136" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2136_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str - None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124011154309Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124011400735Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 14.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2137"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2137_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2137_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2137_1"><button class="btn btn-outline-success"><span class="job_id">2137 : Job ID 753ffa7025b3477ea7747c7a79f65766</span></button></div></a><div aria-labelledby="job_list___sub_heading_2137_1" data-parent="#job_list___sub_accordion_2137" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2137_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] - None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2138"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2138_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2138_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2138_1"><button class="btn btn-outline-success"><span class="job_id">2138 : Job ID de5974bb9d67460caa70b2d2e5b58fe4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2138_1" data-parent="#job_list___sub_accordion_2138" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2138_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str - None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2139"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2139_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2139_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2139_1"><button class="btn btn-outline-success"><span class="job_id">2139 : Job ID 672193154ab8440ca7ae149d4a3d55ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_2139_1" data-parent="#job_list___sub_accordion_2139" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2139_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] - None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2140"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2140_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2140_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2140_1"><button class="btn btn-outline-success"><span class="job_id">2140 : Job ID 9fb0039ada7842e088a859e06a333a85</span></button></div></a><div aria-labelledby="job_list___sub_heading_2140_1" data-parent="#job_list___sub_accordion_2140" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2140_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str - None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2141"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2141_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2141_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2141_1"><button class="btn btn-outline-success"><span class="job_id">2141 : Job ID 08c1cdcf8e964e81b0872c122c741c37</span></button></div></a><div aria-labelledby="job_list___sub_heading_2141_1" data-parent="#job_list___sub_accordion_2141" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2141_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str * None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2142"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2142_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2142_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2142_1"><button class="btn btn-outline-success"><span class="job_id">2142 : Job ID 8094e1659ab84a6b90feebb2f1cafbe2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2142_1" data-parent="#job_list___sub_accordion_2142" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2142_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str * None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2143"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2143_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2143_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2143_1"><button class="btn btn-outline-success"><span class="job_id">2143 : Job ID c835d0c6b56a4ff5b5715a05e436d52e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2143_1" data-parent="#job_list___sub_accordion_2143" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2143_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] * None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2144"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2144_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2144_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2144_1"><button class="btn btn-outline-success"><span class="job_id">2144 : Job ID 1727d9dd82384da2b8518a2ef1a4bcbc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2144_1" data-parent="#job_list___sub_accordion_2144" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2144_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str * None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2145"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2145_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2145_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2145_1"><button class="btn btn-outline-success"><span class="job_id">2145 : Job ID 1d340ac56ee94b4d98c0e4e9878b5df6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2145_1" data-parent="#job_list___sub_accordion_2145" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2145_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] * None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003327648563Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251018T003327894513Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 15.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2146"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2146_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2146_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2146_1"><button class="btn btn-outline-success"><span class="job_id">2146 : Job ID f699401e5b264cf9a819772b61e2e463</span></button></div></a><div aria-labelledby="job_list___sub_heading_2146_1" data-parent="#job_list___sub_accordion_2146" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2146_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str * None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2147"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2147_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2147_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2147_1"><button class="btn btn-outline-success"><span class="job_id">2147 : Job ID fefa78a64d1145a7bd6aeb5ddd6cb7cd</span></button></div></a><div aria-labelledby="job_list___sub_heading_2147_1" data-parent="#job_list___sub_accordion_2147" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2147_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str / None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.61s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2148"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2148_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2148_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2148_1"><button class="btn btn-outline-success"><span class="job_id">2148 : Job ID 178b0245f02448869f6a4d8419f4e134</span></button></div></a><div aria-labelledby="job_list___sub_heading_2148_1" data-parent="#job_list___sub_accordion_2148" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2148_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str / None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2149"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2149_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2149_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2149_1"><button class="btn btn-outline-success"><span class="job_id">2149 : Job ID 2584ad3b8d1241388b54515fabee496f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2149_1" data-parent="#job_list___sub_accordion_2149" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2149_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] / None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2150"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2150_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2150_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2150_1"><button class="btn btn-outline-success"><span class="job_id">2150 : Job ID c6ba98a88ff64c27bf396851c21b3ce9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2150_1" data-parent="#job_list___sub_accordion_2150" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2150_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str / None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 16.31s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2151"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2151_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2151_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2151_1"><button class="btn btn-outline-success"><span class="job_id">2151 : Job ID 9c7138d858214fe9b23c7595ab774c9c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2151_1" data-parent="#job_list___sub_accordion_2151" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2151_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] / None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.52s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2152"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2152_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2152_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2152_1"><button class="btn btn-outline-success"><span class="job_id">2152 : Job ID 155afd300f2747879b2c0c2d34d0465f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2152_1" data-parent="#job_list___sub_accordion_2152" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2152_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str / None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2153"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2153_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2153_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2153_1"><button class="btn btn-outline-success"><span class="job_id">2153 : Job ID 0a5b075241984c54881b9fbaf2e27bf5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2153_1" data-parent="#job_list___sub_accordion_2153" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2153_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str // None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110653182886Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T110653422014Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 14.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2154"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2154_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2154_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2154_1"><button class="btn btn-outline-success"><span class="job_id">2154 : Job ID 36ef0e56f3774047b0d7a1373ec1bd6a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2154_1" data-parent="#job_list___sub_accordion_2154" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2154_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str // None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2155"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2155_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2155_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2155_1"><button class="btn btn-outline-success"><span class="job_id">2155 : Job ID 4372feeb3cae4b2c9d624a9744120257</span></button></div></a><div aria-labelledby="job_list___sub_heading_2155_1" data-parent="#job_list___sub_accordion_2155" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2155_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] // None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2156"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2156_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2156_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2156_1"><button class="btn btn-outline-success"><span class="job_id">2156 : Job ID 4c0ffae339864b789c1dbb62ade4cc99</span></button></div></a><div aria-labelledby="job_list___sub_heading_2156_1" data-parent="#job_list___sub_accordion_2156" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2156_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str // None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2157"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2157_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2157_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2157_1"><button class="btn btn-outline-success"><span class="job_id">2157 : Job ID 9dd2867ed98c40d4996cf7c4c58c875a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2157_1" data-parent="#job_list___sub_accordion_2157" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2157_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] // None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2158"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2158_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2158_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2158_1"><button class="btn btn-outline-success"><span class="job_id">2158 : Job ID b86391e3f4f24c679c234b32e9cca895</span></button></div></a><div aria-labelledby="job_list___sub_heading_2158_1" data-parent="#job_list___sub_accordion_2158" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2158_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str // None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2159"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2159_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2159_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2159_1"><button class="btn btn-outline-success"><span class="job_id">2159 : Job ID e0ce0935823e4cbb892a59ad05e26276</span></button></div></a><div aria-labelledby="job_list___sub_heading_2159_1" data-parent="#job_list___sub_accordion_2159" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2159_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str % None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2160"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2160_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2160_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2160_1"><button class="btn btn-outline-success"><span class="job_id">2160 : Job ID 94397085baf1483a81ac5807788bedb7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2160_1" data-parent="#job_list___sub_accordion_2160" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2160_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str % None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2161"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2161_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2161_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2161_1"><button class="btn btn-outline-success"><span class="job_id">2161 : Job ID aedcd7a94ce04c359515fe3253a09d62</span></button></div></a><div aria-labelledby="job_list___sub_heading_2161_1" data-parent="#job_list___sub_accordion_2161" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2161_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] % None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2162"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2162_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2162_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2162_1"><button class="btn btn-outline-success"><span class="job_id">2162 : Job ID 85681629605c4eedacffb55282968c96</span></button></div></a><div aria-labelledby="job_list___sub_heading_2162_1" data-parent="#job_list___sub_accordion_2162" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2162_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str % None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.96s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2163"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2163_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2163_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2163_1"><button class="btn btn-outline-success"><span class="job_id">2163 : Job ID 9e429668212f41ec9763a810b33db9e3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2163_1" data-parent="#job_list___sub_accordion_2163" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2163_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] % None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2164"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2164_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2164_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2164_1"><button class="btn btn-outline-success"><span class="job_id">2164 : Job ID 36536e7811294a819baab3670bb011ef</span></button></div></a><div aria-labelledby="job_list___sub_heading_2164_1" data-parent="#job_list___sub_accordion_2164" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2164_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str % None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.59s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2165"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2165_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2165_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2165_1"><button class="btn btn-outline-success"><span class="job_id">2165 : Job ID 7ddecd7b14d943aca63f77c95163ac4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2165_1" data-parent="#job_list___sub_accordion_2165" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2165_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str ** None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2166"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2166_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2166_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2166_1"><button class="btn btn-outline-success"><span class="job_id">2166 : Job ID 19077e7f486d4f4995114c3635b5353c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2166_1" data-parent="#job_list___sub_accordion_2166" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2166_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str ** None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2167"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2167_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2167_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2167_1"><button class="btn btn-outline-success"><span class="job_id">2167 : Job ID efbdc8e4733643c2a45508b583b31ed2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2167_1" data-parent="#job_list___sub_accordion_2167" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2167_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] ** None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2168"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2168_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2168_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2168_1"><button class="btn btn-outline-success"><span class="job_id">2168 : Job ID 39fa0e17427a4b79b7a64526dff3fcf6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2168_1" data-parent="#job_list___sub_accordion_2168" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2168_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str ** None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2169"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2169_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2169_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2169_1"><button class="btn btn-outline-success"><span class="job_id">2169 : Job ID 7502a76a761b4e3ab27275ddf477d753</span></button></div></a><div aria-labelledby="job_list___sub_heading_2169_1" data-parent="#job_list___sub_accordion_2169" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2169_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] ** None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2170"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2170_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2170_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2170_1"><button class="btn btn-outline-success"><span class="job_id">2170 : Job ID 85f4f19de3b64a2285e7bf3d4d5d2629</span></button></div></a><div aria-labelledby="job_list___sub_heading_2170_1" data-parent="#job_list___sub_accordion_2170" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2170_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str ** None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124810267651Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T124810611013Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 15.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2171"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2171_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2171_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2171_1"><button class="btn btn-outline-success"><span class="job_id">2171 : Job ID 535116acfefa4d83b21db17c4f894bb1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2171_1" data-parent="#job_list___sub_accordion_2171" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2171_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str &gt;&gt; None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2172"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2172_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2172_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2172_1"><button class="btn btn-outline-success"><span class="job_id">2172 : Job ID 5e07ef7bdc02478ca4f60328564f4597</span></button></div></a><div aria-labelledby="job_list___sub_heading_2172_1" data-parent="#job_list___sub_accordion_2172" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2172_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str &gt;&gt; None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2173"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2173_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2173_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2173_1"><button class="btn btn-outline-success"><span class="job_id">2173 : Job ID bee0e88c0500419f8b9384bd7b61edf0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2173_1" data-parent="#job_list___sub_accordion_2173" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2173_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] &gt;&gt; None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2174"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2174_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2174_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2174_1"><button class="btn btn-outline-success"><span class="job_id">2174 : Job ID 022ae4e5dbd44a32ba091f2791db72f3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2174_1" data-parent="#job_list___sub_accordion_2174" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2174_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str &gt;&gt; None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2175"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2175_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2175_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2175_1"><button class="btn btn-outline-success"><span class="job_id">2175 : Job ID c622fda621e142679e77691fa6b0c942</span></button></div></a><div aria-labelledby="job_list___sub_heading_2175_1" data-parent="#job_list___sub_accordion_2175" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2175_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] &gt;&gt; None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2176"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2176_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2176_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2176_1"><button class="btn btn-outline-success"><span class="job_id">2176 : Job ID 779d90d66be34023add1078a06d0916b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2176_1" data-parent="#job_list___sub_accordion_2176" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2176_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str &gt;&gt; None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2177"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2177_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2177_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2177_1"><button class="btn btn-outline-success"><span class="job_id">2177 : Job ID 96add0d6e7e84d1abd1b2ef11ec1cbce</span></button></div></a><div aria-labelledby="job_list___sub_heading_2177_1" data-parent="#job_list___sub_accordion_2177" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2177_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str &lt;&lt; None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2178"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2178_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2178_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2178_1"><button class="btn btn-outline-success"><span class="job_id">2178 : Job ID e06b2f7433394c948a84ffc18b48c6cf</span></button></div></a><div aria-labelledby="job_list___sub_heading_2178_1" data-parent="#job_list___sub_accordion_2178" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2178_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str &lt;&lt; None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2179"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2179_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2179_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2179_1"><button class="btn btn-outline-success"><span class="job_id">2179 : Job ID 468128905199406e9147086ff0c8dea3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2179_1" data-parent="#job_list___sub_accordion_2179" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2179_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] &lt;&lt; None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144417107588Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T144417287197Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 14.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2180"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2180_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2180_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2180_1"><button class="btn btn-outline-success"><span class="job_id">2180 : Job ID e24483db1f8a4c7d935d92eb95155e1c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2180_1" data-parent="#job_list___sub_accordion_2180" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2180_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str &lt;&lt; None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2181"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2181_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2181_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2181_1"><button class="btn btn-outline-success"><span class="job_id">2181 : Job ID 93c645d1642140828c27ec56f574cdba</span></button></div></a><div aria-labelledby="job_list___sub_heading_2181_1" data-parent="#job_list___sub_accordion_2181" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2181_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] &lt;&lt; None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2182"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2182_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2182_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2182_1"><button class="btn btn-outline-success"><span class="job_id">2182 : Job ID dc004363ddbf4f2fb256f69e4c2e6086</span></button></div></a><div aria-labelledby="job_list___sub_heading_2182_1" data-parent="#job_list___sub_accordion_2182" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2182_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str &lt;&lt; None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2183"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2183_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2183_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2183_1"><button class="btn btn-outline-success"><span class="job_id">2183 : Job ID acfc223f6ca84e51a5c0c1db93c66a6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2183_1" data-parent="#job_list___sub_accordion_2183" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2183_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str &amp; None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2184"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2184_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2184_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2184_1"><button class="btn btn-outline-success"><span class="job_id">2184 : Job ID 0a6d37f2f08f4010aab5a3c4c57bf8d2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2184_1" data-parent="#job_list___sub_accordion_2184" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2184_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str &amp; None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104557653619Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T104557862788Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 14.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2185"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2185_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2185_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2185_1"><button class="btn btn-outline-success"><span class="job_id">2185 : Job ID 928bc6390de64f9b83ce2400d1b45d4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2185_1" data-parent="#job_list___sub_accordion_2185" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2185_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] &amp; None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2186"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2186_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2186_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2186_1"><button class="btn btn-outline-success"><span class="job_id">2186 : Job ID 9fd78c1f40a44518ae76f6ec7e0dce14</span></button></div></a><div aria-labelledby="job_list___sub_heading_2186_1" data-parent="#job_list___sub_accordion_2186" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2186_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str &amp; None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230249536051Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T230249808155Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 9 warnings in 15.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2187"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2187_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2187_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2187_1"><button class="btn btn-outline-success"><span class="job_id">2187 : Job ID 606bf8cd43924bdbad5ae4b0da2cc409</span></button></div></a><div aria-labelledby="job_list___sub_heading_2187_1" data-parent="#job_list___sub_accordion_2187" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2187_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] &amp; None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2188"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2188_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2188_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2188_1"><button class="btn btn-outline-success"><span class="job_id">2188 : Job ID 281f8dd240f44a5396a4a498329f37b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2188_1" data-parent="#job_list___sub_accordion_2188" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2188_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str &amp; None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2189"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2189_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2189_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2189_1"><button class="btn btn-outline-success"><span class="job_id">2189 : Job ID 2f9db50339ba4765a4aa20a5f7c46299</span></button></div></a><div aria-labelledby="job_list___sub_heading_2189_1" data-parent="#job_list___sub_accordion_2189" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2189_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=34" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (34, 29), end pos: (34, 30)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -31,7 +31,7 @@ def __init__( self, storage_dir: str, - public_keys_dir: str | None = None, + public_keys_dir: str ^ None = None, server_private_key: str | None = None, ): self.storage_dir = storage_dir</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102611071007Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102611318224Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 11 failed, 31 passed, 9 warnings in 15.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2190"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2190_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2190_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2190_1"><button class="btn btn-outline-success"><span class="job_id">2190 : Job ID 086ec74878af408fbe17b9ddfee08528</span></button></div></a><div aria-labelledby="job_list___sub_heading_2190_1" data-parent="#job_list___sub_accordion_2190" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2190_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=35" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (35, 32), end pos: (35, 33)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -32,7 +32,7 @@ self, storage_dir: str, public_keys_dir: str | None = None, - server_private_key: str | None = None, + server_private_key: str ^ None = None, ): self.storage_dir = storage_dir self.watermarked_pdfs: dict[</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.70s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2191"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2191_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2191_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2191_1"><button class="btn btn-outline-success"><span class="job_id">2191 : Job ID 5e7e41ba6bb34f788f232ce67cc9dd28</span></button></div></a><div aria-labelledby="job_list___sub_heading_2191_1" data-parent="#job_list___sub_accordion_2191" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2191_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=100" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (100, 72), end pos: (100, 73)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -97,7 +97,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None: + def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] ^ None: """ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2192"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2192_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2192_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2192_1"><button class="btn btn-outline-success"><span class="job_id">2192 : Job ID 8deca2482b4144209ea2713cf17fe3e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2192_1" data-parent="#job_list___sub_accordion_2192" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2192_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=190" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (190, 69), end pos: (190, 70)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -187,7 +187,7 @@ except Exception as e: return {"error": f"RMAP processing error: {str(e)}"} - def _find_identity_for_session(self, session_secret: str) -&gt; str | None: + def _find_identity_for_session(self, session_secret: str) -&gt; str ^ None: """ Try to find the identity that corresponds to this session secret. This implements correlation between Message 1 and Message 2.</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2193"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2193_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2193_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2193_1"><button class="btn btn-outline-success"><span class="job_id">2193 : Job ID 8f4712cec67b4492b9d919dca0c82f30</span></button></div></a><div aria-labelledby="job_list___sub_heading_2193_1" data-parent="#job_list___sub_accordion_2193" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2193_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=207" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (207, 78), end pos: (207, 79)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -204,7 +204,7 @@ # Default fallback - better than hardcoded "RMAP_CLIENT" return "Unknown_Group" - def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] | None: + def get_watermarked_pdf_info(self, session_secret: str) -&gt; dict[str, Any] ^ None: """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2194"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2194_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2194_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2194_1"><button class="btn btn-outline-success"><span class="job_id">2194 : Job ID 22beea7a170b454ca5ab933d793c924e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2194_1" data-parent="#job_list___sub_accordion_2194" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2194_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=211" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (211, 63), end pos: (211, 64)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -208,7 +208,7 @@ """Get watermarked PDF metadata for a session secret.""" return self.watermarked_pdfs.get(session_secret) - def get_session_identity(self, session_secret: str) -&gt; str | None: + def get_session_identity(self, session_secret: str) -&gt; str ^ None: """Get the identity (group name) for a session secret.""" return self.session_identities.get(session_secret) </pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 405 == 200 E + where 405 = &lt;WrapperTestResponse streamed [405 METHOD NOT ALLOWED]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( test/test_api.py::test_rmap_initiate test/test_api.py::test_rmap_get_link C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 405 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 405 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 9 warnings in 15.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2195"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2195_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2195_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2195_1"><button class="btn btn-outline-danger"><span class="job_id">2195 : Job ID e9618f81de4e47c18913b919d8abb8a3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2195_1" data-parent="#job_list___sub_accordion_2195" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2195_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 39), end pos: (164, 40)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) == 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2196"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2196_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2196_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2196_1"><button class="btn btn-outline-danger"><span class="job_id">2196 : Job ID 6b7a4edfe67445c1b24721464fe139e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2196_1" data-parent="#job_list___sub_accordion_2196" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2196_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 39), end pos: (164, 40)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) != 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2197"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2197_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2197_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2197_1"><button class="btn btn-outline-danger"><span class="job_id">2197 : Job ID 370866c453bc4cb893bd2561b6b44349</span></button></div></a><div aria-labelledby="job_list___sub_heading_2197_1" data-parent="#job_list___sub_accordion_2197" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2197_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 39), end pos: (164, 40)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) &lt;= 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2198"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2198_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2198_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2198_1"><button class="btn btn-outline-danger"><span class="job_id">2198 : Job ID 6ea4ed2c4114489f9c394172d2584695</span></button></div></a><div aria-labelledby="job_list___sub_heading_2198_1" data-parent="#job_list___sub_accordion_2198" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2198_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 39), end pos: (164, 40)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) &gt; 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2199"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2199_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2199_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2199_1"><button class="btn btn-outline-success"><span class="job_id">2199 : Job ID 6db04c6df2f44892894995f23b9a62f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2199_1" data-parent="#job_list___sub_accordion_2199" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2199_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 39), end pos: (164, 40)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) &gt;= 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150213416168Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T150214233313Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2200"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2200_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2200_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2200_1"><button class="btn btn-outline-danger"><span class="job_id">2200 : Job ID 29936b0eeac444fbbc20990990b78a46</span></button></div></a><div aria-labelledby="job_list___sub_heading_2200_1" data-parent="#job_list___sub_accordion_2200" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2200_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 41), end pos: (166, 42)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) == 32: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2201"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2201_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2201_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2201_1"><button class="btn btn-outline-danger"><span class="job_id">2201 : Job ID fc35fce919594dc7b6b23b7b759c0008</span></button></div></a><div aria-labelledby="job_list___sub_heading_2201_1" data-parent="#job_list___sub_accordion_2201" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2201_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 41), end pos: (166, 42)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) != 32: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2202"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2202_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2202_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2202_1"><button class="btn btn-outline-danger"><span class="job_id">2202 : Job ID aa80e0a9b3a34eacbc0105a5658a263e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2202_1" data-parent="#job_list___sub_accordion_2202" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2202_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 41), end pos: (166, 42)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) &lt; 32: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2203"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2203_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2203_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2203_1"><button class="btn btn-outline-success"><span class="job_id">2203 : Job ID 5e101d9d0e134385bbc7a2ba94e106b5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2203_1" data-parent="#job_list___sub_accordion_2203" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2203_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 41), end pos: (166, 42)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) &lt;= 32: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T100544996160Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T100545945187Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.60s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2204"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2204_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2204_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2204_1"><button class="btn btn-outline-danger"><span class="job_id">2204 : Job ID ecd0a5426495417c8575432bfadd0c07</span></button></div></a><div aria-labelledby="job_list___sub_heading_2204_1" data-parent="#job_list___sub_accordion_2204" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2204_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 41), end pos: (166, 42)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) &gt;= 32: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2205"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2205_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2205_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2205_1"><button class="btn btn-outline-danger"><span class="job_id">2205 : Job ID 1dd4b8b712ce4e12a0e70b0b7e8cfb03</span></button></div></a><div aria-labelledby="job_list___sub_heading_2205_1" data-parent="#job_list___sub_accordion_2205" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2205_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (49, 27), end pos: (49, 29)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -46,7 +46,7 @@ ] = {} # Store identity for each nonce_client during handshake # Set up paths for keys - if public_keys_dir is None: + if public_keys_dir is not None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent public_keys_dir = str(server_root / "public-keys" / "pki")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2206"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2206_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2206_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2206_1"><button class="btn btn-outline-danger"><span class="job_id">2206 : Job ID 90b848472bdc4c14a1da582a87bc7400</span></button></div></a><div aria-labelledby="job_list___sub_heading_2206_1" data-parent="#job_list___sub_accordion_2206" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2206_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=54" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (54, 30), end pos: (54, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -51,7 +51,7 @@ server_root = Path(__file__).parent.parent public_keys_dir = str(server_root / "public-keys" / "pki") - if server_private_key is None: + if server_private_key is not None: # Default to server_priv.asc in src directory server_private_key = str(Path(__file__).parent / "server_priv.asc") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2207"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2207_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2207_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2207_1"><button class="btn btn-outline-danger"><span class="job_id">2207 : Job ID daedb51ccb5646febe18cf38012b27f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2207_1" data-parent="#job_list___sub_accordion_2207" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2207_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=88" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (88, 32), end pos: (88, 38)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_IsNot_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -85,7 +85,7 @@ if identity_data: nonce_client = identity_data.get("nonceClient") identity = identity_data.get("identity", "Unknown_Group") - if nonce_client is not None: + if nonce_client is None: # Store identity for later correlation with session secret self.pending_identities[nonce_client] = identity </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2208"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2208_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2208_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2208_1"><button class="btn btn-outline-danger"><span class="job_id">2208 : Job ID 6d6d4cc8d64e43c98f62f288f8588ae9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2208_1" data-parent="#job_list___sub_accordion_2208" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2208_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (105, 11), end pos: (105, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -102,7 +102,7 @@ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library. """ - if not PGP_AVAILABLE: + if PGP_AVAILABLE: return None try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2209"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2209_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2209_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2209_1"><button class="btn btn-outline-success"><span class="job_id">2209 : Job ID 84c7c4653e514f4a9ab72c1c1f999660</span></button></div></a><div aria-labelledby="job_list___sub_heading_2209_1" data-parent="#job_list___sub_accordion_2209" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2209_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=111" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (111, 15), end pos: (111, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -108,7 +108,7 @@ try: # Load server private key for decryption server_private_key_path = str(Path(__file__).parent / "server_priv.asc") - if not Path(server_private_key_path).exists(): + if Path(server_private_key_path).exists(): return None # Load the private key</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134634431319Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134635320571Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2210"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2210_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2210_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2210_1"><button class="btn btn-outline-danger"><span class="job_id">2210 : Job ID 9a279ef26018476bb06b5c8650cf2f52</span></button></div></a><div aria-labelledby="job_list___sub_heading_2210_1" data-parent="#job_list___sub_accordion_2210" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2210_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=120" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (120, 19), end pos: (120, 22)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -117,7 +117,7 @@ # Unlock the private key if it's protected if server_key.is_protected: passphrase = os.getenv("PRIVKEY_PASSPHRASE", "") - if not passphrase: + if passphrase: return None server_key.unlock(passphrase) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2211"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2211_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2211_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2211_1"><button class="btn btn-outline-danger"><span class="job_id">2211 : Job ID 538afac2370c4d0fa507114bf0f06a77</span></button></div></a><div aria-labelledby="job_list___sub_heading_2211_1" data-parent="#job_list___sub_accordion_2211" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2211_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=49" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (49, 11), end pos: (49, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -46,7 +46,7 @@ ] = {} # Store identity for each nonce_client during handshake # Set up paths for keys - if public_keys_dir is None: + if not public_keys_dir is None: # Default to public-keys/pki directory relative to server root server_root = Path(__file__).parent.parent public_keys_dir = str(server_root / "public-keys" / "pki")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.42s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2212"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2212_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2212_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2212_1"><button class="btn btn-outline-danger"><span class="job_id">2212 : Job ID 0d07973027884843a1a769825126eb08</span></button></div></a><div aria-labelledby="job_list___sub_heading_2212_1" data-parent="#job_list___sub_accordion_2212" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2212_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=54" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (54, 11), end pos: (54, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -51,7 +51,7 @@ server_root = Path(__file__).parent.parent public_keys_dir = str(server_root / "public-keys" / "pki") - if server_private_key is None: + if not server_private_key is None: # Default to server_priv.asc in src directory server_private_key = str(Path(__file__).parent / "server_priv.asc") </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2213"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2213_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2213_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2213_1"><button class="btn btn-outline-success"><span class="job_id">2213 : Job ID fe936a41f3f94e8f8333d5c1b9b099e1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2213_1" data-parent="#job_list___sub_accordion_2213" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2213_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (80, 15), end pos: (80, 40)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -77,7 +77,7 @@ Returns: {"payload": "&lt;base64(encrypted_response)&gt;"} or {"error": "&lt;reason&gt;"} """ try: - if "payload" not in incoming: + if not "payload" not in incoming: return {"error": "payload is required"} # Try to extract identity from the payload before processing</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 400 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 400 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 16.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2214"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2214_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2214_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2214_1"><button class="btn btn-outline-success"><span class="job_id">2214 : Job ID 9c6ac2c0372d464590ec7127e5aa2af7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2214_1" data-parent="#job_list___sub_accordion_2214" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2214_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=85" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (85, 15), end pos: (85, 28)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -82,7 +82,7 @@ # Try to extract identity from the payload before processing identity_data = self._decrypt_message1_payload(incoming["payload"]) - if identity_data: + if not identity_data: nonce_client = identity_data.get("nonceClient") identity = identity_data.get("identity", "Unknown_Group") if nonce_client is not None:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFFFFF........................... [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T164932659868Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T164933500489Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_api.py::test_rmap_initiate - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 13 failed, 29 passed, 23 warnings in 16.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2215"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2215_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2215_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2215_1"><button class="btn btn-outline-danger"><span class="job_id">2215 : Job ID b60e544f540b49de9c09dcec7006698d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2215_1" data-parent="#job_list___sub_accordion_2215" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2215_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=88" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (88, 19), end pos: (88, 43)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -85,7 +85,7 @@ if identity_data: nonce_client = identity_data.get("nonceClient") identity = identity_data.get("identity", "Unknown_Group") - if nonce_client is not None: + if not nonce_client is not None: # Store identity for later correlation with session secret self.pending_identities[nonce_client] = identity </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2216"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2216_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2216_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2216_1"><button class="btn btn-outline-danger"><span class="job_id">2216 : Job ID 909e7349fa2c4470b2b6ac3833feb84d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2216_1" data-parent="#job_list___sub_accordion_2216" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2216_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=105" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (105, 11), end pos: (105, 28)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -102,7 +102,7 @@ Decrypt message 1 payload to extract identity and nonce_client. This allows us to capture the identity before passing to RMAP library. """ - if not PGP_AVAILABLE: + if not not PGP_AVAILABLE: return None try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2217"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2217_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2217_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2217_1"><button class="btn btn-outline-danger"><span class="job_id">2217 : Job ID 3bb7c5f4629e4d50b622d9ec0efe344e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2217_1" data-parent="#job_list___sub_accordion_2217" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2217_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=111" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (111, 15), end pos: (111, 57)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -108,7 +108,7 @@ try: # Load server private key for decryption server_private_key_path = str(Path(__file__).parent / "server_priv.asc") - if not Path(server_private_key_path).exists(): + if not not Path(server_private_key_path).exists(): return None # Load the private key</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.28s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2218"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2218_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2218_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2218_1"><button class="btn btn-outline-danger"><span class="job_id">2218 : Job ID 9751119b7d334adf90c9bcee94161585</span></button></div></a><div aria-labelledby="job_list___sub_heading_2218_1" data-parent="#job_list___sub_accordion_2218" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2218_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=118" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (118, 15), end pos: (118, 38)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -115,7 +115,7 @@ server_key, _ = PGPKey.from_file(server_private_key_path) # Unlock the private key if it's protected - if server_key.is_protected: + if not server_key.is_protected: passphrase = os.getenv("PRIVKEY_PASSPHRASE", "") if not passphrase: return None</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2219"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2219_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2219_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2219_1"><button class="btn btn-outline-danger"><span class="job_id">2219 : Job ID ee0cb18b891d4ad4917783e324606951</span></button></div></a><div aria-labelledby="job_list___sub_heading_2219_1" data-parent="#job_list___sub_accordion_2219" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2219_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=120" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (120, 19), end pos: (120, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -117,7 +117,7 @@ # Unlock the private key if it's protected if server_key.is_protected: passphrase = os.getenv("PRIVKEY_PASSPHRASE", "") - if not passphrase: + if not not passphrase: return None server_key.unlock(passphrase) </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2220"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2220_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2220_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2220_1"><button class="btn btn-outline-success"><span class="job_id">2220 : Job ID cf333512e9c841968e50c1586c7768c2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2220_1" data-parent="#job_list___sub_accordion_2220" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2220_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=153" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (153, 15), end pos: (153, 40)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -150,7 +150,7 @@ watermarked PDF. """ try: - if "payload" not in incoming: + if not "payload" not in incoming: return {"error": "payload is required"} # Use RMAP library to handle message 2</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 400 == 200 E + where 400 = &lt;WrapperTestResponse streamed [400 BAD REQUEST]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 400 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2221"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2221_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2221_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2221_1"><button class="btn btn-outline-danger"><span class="job_id">2221 : Job ID 447695607bbb46448a7fdb46ac98fdc1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2221_1" data-parent="#job_list___sub_accordion_2221" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2221_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=160" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (160, 15), end pos: (160, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -157,7 +157,7 @@ # The library will return {"result": "hex_string"} or {"error": "message"} result = self.rmap.handle_message2(incoming) - if "result" in result: + if not "result" in result: session_secret = result["result"] # Ensure it's a 32-character hex string</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2222"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2222_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2222_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2222_1"><button class="btn btn-outline-danger"><span class="job_id">2222 : Job ID 22a53cbca9c14009b75188606d1a15b3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2222_1" data-parent="#job_list___sub_accordion_2222" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2222_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 19), end pos: (164, 43)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if not len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2223"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2223_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2223_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2223_1"><button class="btn btn-outline-danger"><span class="job_id">2223 : Job ID 2f0df62c4f814d8cb9ce3dfd439fde8a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2223_1" data-parent="#job_list___sub_accordion_2223" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2223_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=173" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (173, 19), end pos: (173, 27)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -170,7 +170,7 @@ # The session secret is (nonce_client &lt;&lt; 64) | nonce_server # We can try to find the matching identity identity = self._find_identity_for_session(session_secret) - if identity: + if not identity: self.session_identities[session_secret] = identity # Store watermark metadata for this session</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2224"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2224_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2224_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2224_1"><button class="btn btn-outline-success"><span class="job_id">2224 : Job ID 4f50581d03fc478884963acb6d05e7ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_2224_1" data-parent="#job_list___sub_accordion_2224" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2224_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=197" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (197, 11), end pos: (197, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -194,7 +194,7 @@ """ # For simple cases where there's only one pending identity, # use it (works for single concurrent session) - if self.pending_identities: + if not self.pending_identities: # Use the first available identity and clear it identity = next(iter(self.pending_identities.values())) # Clear pending identities since we've used them</pre></div><div class="alert alert-secondary"><pre class="diff">.............FF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) assert response.status_code == 200 json_data = response.get_json() assert "payload" in json_data # Decrypt response to get the actual nonceServer decrypted = decrypt_server_response( json_data["payload"], client_privkey_path=str(Path(__file__).parent.parent / "client_keys" / "group13-private.asc"), passphrase=os.environ.get("PRIVKEY_PASSPHRASE", "") ) nonce_server = decrypted["nonceServer"] # Step 2: Use that nonceServer in the rmap-get-link call encrypted_payload = encrypt_payload_for_server({ "nonceServer": nonce_server }) response = client.post("/api/rmap-get-link", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:585: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 2 failed, 40 passed, 23 warnings in 20.67s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2225"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2225_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2225_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2225_1"><button class="btn btn-outline-success"><span class="job_id">2225 : Job ID 83fa7a4b3f6646168bdfa9b6fd1c87f1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2225_1" data-parent="#job_list___sub_accordion_2225" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2225_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=23" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (23, 20), end pos: (23, 24)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -20,7 +20,7 @@ try: from pgpy import PGPKey, PGPMessage - PGP_AVAILABLE = True + PGP_AVAILABLE = False except ImportError: PGP_AVAILABLE = False </pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133800282883Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133801180193Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2226"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2226_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2226_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2226_1"><button class="btn btn-outline-danger"><span class="job_id">2226 : Job ID 708700af021d4bd1ac2019035ad5081f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2226_1" data-parent="#job_list___sub_accordion_2226" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2226_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=179" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (179, 31), end pos: (179, 35)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -176,7 +176,7 @@ # Store watermark metadata for this session self.watermarked_pdfs[session_secret] = { "method": "robust-xmp", - "created": True, + "created": False, "session_secret": session_secret, } </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2227"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2227_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2227_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2227_1"><button class="btn btn-outline-danger"><span class="job_id">2227 : Job ID e9a4c77c13ec41b5b38d331eb204f9bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2227_1" data-parent="#job_list___sub_accordion_2227" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2227_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=25" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (25, 20), end pos: (25, 25)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -22,7 +22,7 @@ PGP_AVAILABLE = True except ImportError: - PGP_AVAILABLE = False + PGP_AVAILABLE = True class SimpleRMAP:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2228"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2228_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2228_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2228_1"><button class="btn btn-outline-danger"><span class="job_id">2228 : Job ID d486118c9e4e4db897b4cf8f921b5e6e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2228_1" data-parent="#job_list___sub_accordion_2228" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2228_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=24" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (24, 7), end pos: (24, 18)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -21,7 +21,7 @@ from pgpy import PGPKey, PGPMessage PGP_AVAILABLE = True -except ImportError: +except CosmicRayTestingException: PGP_AVAILABLE = False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2229"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2229_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2229_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2229_1"><button class="btn btn-outline-danger"><span class="job_id">2229 : Job ID 8e57b7cb619f4e39ad278a747a93fa75</span></button></div></a><div aria-labelledby="job_list___sub_heading_2229_1" data-parent="#job_list___sub_accordion_2229" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2229_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=97" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (97, 15), end pos: (97, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -94,7 +94,7 @@ return result - except Exception as e: + except CosmicRayTestingException as e: return {"error": f"RMAP processing error: {str(e)}"} def _decrypt_message1_payload(self, payload: str) -&gt; dict[str, Any] | None:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2230"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2230_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2230_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2230_1"><button class="btn btn-outline-success"><span class="job_id">2230 : Job ID 59620933ea3f4efb961eb40705a46d19</span></button></div></a><div aria-labelledby="job_list___sub_heading_2230_1" data-parent="#job_list___sub_accordion_2230" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2230_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=138" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (138, 15), end pos: (138, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -135,7 +135,7 @@ return message_data - except Exception: + except CosmicRayTestingException: return None def handle_message2(self, incoming: dict[str, Any]) -&gt; dict[str, Any]:</pre></div><div class="alert alert-secondary"><pre class="diff">............FFF........................... [100%] ================================== FAILURES =================================== _____________________________ test_rmap_initiate ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_rmap_initiate(client): # Prepare payload test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) # Call route response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:527: AssertionError _____________________________ test_rmap_get_link ______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_rmap_get_link(client, shared_link): # Step 0: Create RMAP service user to assign document to resp = client.post("/api/create-user", json={ "login": "rmap_service", "password": "password_rmap", "email": "service@rmap.su", }) # pragma: allowlist secret # Step 1: Initiate RMAP to get nonceServer test_nonce = 12345678 test_identity = "Group_13" encrypted_payload = encrypt_payload_for_server({ "nonceClient": test_nonce, "identity": test_identity }) response = client.post("/api/rmap-initiate", json={"payload": encrypted_payload}) &gt; assert response.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:567: AssertionError ___________________________ test_get_version_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt;, shared_link = {} def test_get_version_route(client, shared_link): &gt; route = "/api/get-version/" + shared_link.get("version_link").strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'strip' ..\test\test_api.py:604: AttributeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_rmap_initiate - assert 503 == 200 FAILED ..\test\test_api.py::test_rmap_get_link - assert 503 == 200 FAILED ..\test\test_api.py::test_get_version_route - AttributeError: 'NoneTyp... 3 failed, 39 passed, 23 warnings in 16.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2231"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2231_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2231_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2231_1"><button class="btn btn-outline-danger"><span class="job_id">2231 : Job ID 8a2dc2c5334e46e68fbe7af7a4b26014</span></button></div></a><div aria-labelledby="job_list___sub_heading_2231_1" data-parent="#job_list___sub_accordion_2231" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2231_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=187" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (187, 15), end pos: (187, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -184,7 +184,7 @@ return result - except Exception as e: + except CosmicRayTestingException as e: return {"error": f"RMAP processing error: {str(e)}"} def _find_identity_for_session(self, session_secret: str) -&gt; str | None:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2232"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2232_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2232_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2232_1"><button class="btn btn-outline-danger"><span class="job_id">2232 : Job ID 76e523d1165040ac85f125c941a5f0f6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2232_1" data-parent="#job_list___sub_accordion_2232" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2232_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 41), end pos: (164, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) &lt; 33: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2233"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2233_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2233_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2233_1"><button class="btn btn-outline-danger"><span class="job_id">2233 : Job ID 521bb852126f4e35bae02c44009e3417</span></button></div></a><div aria-labelledby="job_list___sub_heading_2233_1" data-parent="#job_list___sub_accordion_2233" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2233_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (164, 41), end pos: (164, 43)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -161,7 +161,7 @@ session_secret = result["result"] # Ensure it's a 32-character hex string - if len(session_secret) &lt; 32: + if len(session_secret) &lt; 31: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: session_secret = session_secret[:32]</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2234"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2234_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2234_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2234_1"><button class="btn btn-outline-danger"><span class="job_id">2234 : Job ID 30de2a8bae8e469cb5769a9ba2125bbb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2234_1" data-parent="#job_list___sub_accordion_2234" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2234_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=165" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (165, 58), end pos: (165, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -162,7 +162,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: - session_secret = session_secret.zfill(32) + session_secret = session_secret.zfill( 33) elif len(session_secret) &gt; 32: session_secret = session_secret[:32] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2235"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2235_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2235_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2235_1"><button class="btn btn-outline-danger"><span class="job_id">2235 : Job ID 65bb0846050a4324b8a624c5e9f8715a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2235_1" data-parent="#job_list___sub_accordion_2235" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2235_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=165" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (165, 58), end pos: (165, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -162,7 +162,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: - session_secret = session_secret.zfill(32) + session_secret = session_secret.zfill( 31) elif len(session_secret) &gt; 32: session_secret = session_secret[:32] </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2236"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2236_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2236_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2236_1"><button class="btn btn-outline-danger"><span class="job_id">2236 : Job ID 7b2f4c5655f34cdba9b525290f06b483</span></button></div></a><div aria-labelledby="job_list___sub_heading_2236_1" data-parent="#job_list___sub_accordion_2236" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2236_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 43), end pos: (166, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) &gt; 33: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2237"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2237_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2237_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2237_1"><button class="btn btn-outline-danger"><span class="job_id">2237 : Job ID 54860f073e064be594d51d1ef01cc91a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2237_1" data-parent="#job_list___sub_accordion_2237" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2237_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=166" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (166, 43), end pos: (166, 45)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -163,7 +163,7 @@ # Ensure it's a 32-character hex string if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) - elif len(session_secret) &gt; 32: + elif len(session_secret) &gt; 31: session_secret = session_secret[:32] # Try to correlate with pending identity</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2238"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2238_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2238_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2238_1"><button class="btn btn-outline-danger"><span class="job_id">2238 : Job ID 63545e82e1694059994f340728def7de</span></button></div></a><div aria-labelledby="job_list___sub_heading_2238_1" data-parent="#job_list___sub_accordion_2238" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2238_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (167, 53), end pos: (167, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -164,7 +164,7 @@ if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: - session_secret = session_secret[:32] + session_secret = session_secret[: 33] # Try to correlate with pending identity # The session secret is (nonce_client &lt;&lt; 64) | nonce_server</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2239"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2239_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2239_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2239_1"><button class="btn btn-outline-danger"><span class="job_id">2239 : Job ID eaa6d115c4ec4afa9fd25b32fb981dde</span></button></div></a><div aria-labelledby="job_list___sub_heading_2239_1" data-parent="#job_list___sub_accordion_2239" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2239_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=simple_rmap.py&amp;line=167" class="text-secondary"><button class="btn btn-outline-dark">simple_rmap.py, start pos: (167, 53), end pos: (167, 55)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asimple_rmap.py +++ bsimple_rmap.py @@ -164,7 +164,7 @@ if len(session_secret) &lt; 32: session_secret = session_secret.zfill(32) elif len(session_secret) &gt; 32: - session_secret = session_secret[:32] + session_secret = session_secret[: 31] # Try to correlate with pending identity # The session secret is (nonce_client &lt;&lt; 64) | nonce_server</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2240"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2240_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2240_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2240_1"><button class="btn btn-outline-success"><span class="job_id">2240 : Job ID 8f7153ec42934e5b99b13accc7a62441</span></button></div></a><div aria-labelledby="job_list___sub_heading_2240_1" data-parent="#job_list___sub_accordion_2240" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2240_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 - 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134800378199Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T134801211641Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2241"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2241_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2241_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2241_1"><button class="btn btn-outline-success"><span class="job_id">2241 : Job ID be61ae2e7aa54f06abfe5fec1e5aa33e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2241_1" data-parent="#job_list___sub_accordion_2241" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2241_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 * 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T161417552055Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T161418362078Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2242"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2242_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2242_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2242_1"><button class="btn btn-outline-danger"><span class="job_id">2242 : Job ID ed6b501cf9304ee3922ce3640d1cedec</span></button></div></a><div aria-labelledby="job_list___sub_heading_2242_1" data-parent="#job_list___sub_accordion_2242" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2242_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 / 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2243"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2243_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2243_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2243_1"><button class="btn btn-outline-danger"><span class="job_id">2243 : Job ID 11d7417b94c64dfba8629f32da860c58</span></button></div></a><div aria-labelledby="job_list___sub_heading_2243_1" data-parent="#job_list___sub_accordion_2243" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2243_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 // 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2244"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2244_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2244_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2244_1"><button class="btn btn-outline-danger"><span class="job_id">2244 : Job ID 867c89ca49984675a1c4f07e42859e20</span></button></div></a><div aria-labelledby="job_list___sub_heading_2244_1" data-parent="#job_list___sub_accordion_2244" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2244_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 % 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.37s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2245"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2245_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2245_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2245_1"><button class="btn btn-outline-danger"><span class="job_id">2245 : Job ID dbc7eee0bc704c3689c9896ba891017e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2245_1" data-parent="#job_list___sub_accordion_2245" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2245_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 ** 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2246"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2246_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2246_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2246_1"><button class="btn btn-outline-danger"><span class="job_id">2246 : Job ID d4c6e26c0bc644b5ae2fff6b97fc3924</span></button></div></a><div aria-labelledby="job_list___sub_heading_2246_1" data-parent="#job_list___sub_accordion_2246" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2246_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 &gt;&gt; 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2247"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2247_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2247_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2247_1"><button class="btn btn-outline-danger"><span class="job_id">2247 : Job ID e567baf69d34429ca49932a17d442976</span></button></div></a><div aria-labelledby="job_list___sub_heading_2247_1" data-parent="#job_list___sub_accordion_2247" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2247_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 &lt;&lt; 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2248"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2248_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2248_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2248_1"><button class="btn btn-outline-danger"><span class="job_id">2248 : Job ID 203d91fe108047b4a64330118063360c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2248_1" data-parent="#job_list___sub_accordion_2248" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2248_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 | 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2249"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2249_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2249_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2249_1"><button class="btn btn-outline-danger"><span class="job_id">2249 : Job ID bf5c254a06774c69ab67a2486be03031</span></button></div></a><div aria-labelledby="job_list___sub_heading_2249_1" data-parent="#job_list___sub_accordion_2249" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2249_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 &amp; 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2250"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2250_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2250_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2250_1"><button class="btn btn-outline-danger"><span class="job_id">2250 : Job ID 31fd22b1b61c466fa1c649e0f840f216</span></button></div></a><div aria-labelledby="job_list___sub_heading_2250_1" data-parent="#job_list___sub_accordion_2250" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2250_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 57), end pos: (299, 58)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Add_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 ^ 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.71s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2251"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2251_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2251_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2251_1"><button class="btn btn-outline-danger"><span class="job_id">2251 : Job ID 5d6127231a504fc28f80493fd00e98d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2251_1" data-parent="#job_list___sub_accordion_2251" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2251_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height + margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2252"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2252_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2252_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2252_1"><button class="btn btn-outline-danger"><span class="job_id">2252 : Job ID 7817a136f5154b3abf76163918f59d86</span></button></div></a><div aria-labelledby="job_list___sub_heading_2252_1" data-parent="#job_list___sub_accordion_2252" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2252_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 + 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2253"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2253_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2253_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2253_1"><button class="btn btn-outline-danger"><span class="job_id">2253 : Job ID f9b921ed30e84e85919fb69612f05b64</span></button></div></a><div aria-labelledby="job_list___sub_heading_2253_1" data-parent="#job_list___sub_accordion_2253" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2253_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height * margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2254"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2254_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2254_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2254_1"><button class="btn btn-outline-danger"><span class="job_id">2254 : Job ID 0460365bacdd418c81c2aa0b1ca326fd</span></button></div></a><div aria-labelledby="job_list___sub_heading_2254_1" data-parent="#job_list___sub_accordion_2254" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2254_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 * 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2255"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2255_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2255_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2255_1"><button class="btn btn-outline-danger"><span class="job_id">2255 : Job ID 145b33536148462fba319dc00e979cea</span></button></div></a><div aria-labelledby="job_list___sub_heading_2255_1" data-parent="#job_list___sub_accordion_2255" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2255_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height / margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2256"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2256_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2256_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2256_1"><button class="btn btn-outline-danger"><span class="job_id">2256 : Job ID 81c89d67a64a495bbafc9d54a8ab84c4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2256_1" data-parent="#job_list___sub_accordion_2256" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2256_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 / 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2257"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2257_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2257_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2257_1"><button class="btn btn-outline-danger"><span class="job_id">2257 : Job ID 42f626d08526470fa5e6d37f7e583247</span></button></div></a><div aria-labelledby="job_list___sub_heading_2257_1" data-parent="#job_list___sub_accordion_2257" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2257_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height // margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2258"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2258_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2258_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2258_1"><button class="btn btn-outline-danger"><span class="job_id">2258 : Job ID 17de28e0691c48368aeda5b7d7e75cd4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2258_1" data-parent="#job_list___sub_accordion_2258" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2258_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 // 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2259"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2259_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2259_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2259_1"><button class="btn btn-outline-danger"><span class="job_id">2259 : Job ID ac3d1bcc19d34c7c977290944c5aab0d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2259_1" data-parent="#job_list___sub_accordion_2259" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2259_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height % margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2260"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2260_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2260_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2260_1"><button class="btn btn-outline-danger"><span class="job_id">2260 : Job ID f2b00627e30b475f876c6d33d5fb662c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2260_1" data-parent="#job_list___sub_accordion_2260" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2260_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 % 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2261"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2261_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2261_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2261_1"><button class="btn btn-outline-success"><span class="job_id">2261 : Job ID 03c874c0934b4c9e94fcc0e6b17e22a9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2261_1" data-parent="#job_list___sub_accordion_2261" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2261_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height ** margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T162552878773Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T162553812119Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.50s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2262"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2262_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2262_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2262_1"><button class="btn btn-outline-danger"><span class="job_id">2262 : Job ID cc8469b47fcb49c888b6932b78d77545</span></button></div></a><div aria-labelledby="job_list___sub_heading_2262_1" data-parent="#job_list___sub_accordion_2262" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2262_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 ** 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2263"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2263_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2263_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2263_1"><button class="btn btn-outline-danger"><span class="job_id">2263 : Job ID ea6a1b306f1344fca842008104ba3399</span></button></div></a><div aria-labelledby="job_list___sub_heading_2263_1" data-parent="#job_list___sub_accordion_2263" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2263_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height &gt;&gt; margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2264"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2264_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2264_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2264_1"><button class="btn btn-outline-danger"><span class="job_id">2264 : Job ID f3d578ca9667423ca282db9faea3e331</span></button></div></a><div aria-labelledby="job_list___sub_heading_2264_1" data-parent="#job_list___sub_accordion_2264" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2264_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 &gt;&gt; 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2265"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2265_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2265_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2265_1"><button class="btn btn-outline-danger"><span class="job_id">2265 : Job ID b986aeda13234937b23c7361ba0277ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_2265_1" data-parent="#job_list___sub_accordion_2265" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2265_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height &lt;&lt; margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2266"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2266_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2266_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2266_1"><button class="btn btn-outline-danger"><span class="job_id">2266 : Job ID 98291a111d1d4c55882c98a7bd408fbc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2266_1" data-parent="#job_list___sub_accordion_2266" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2266_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 &lt;&lt; 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2267"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2267_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2267_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2267_1"><button class="btn btn-outline-success"><span class="job_id">2267 : Job ID e8ddc3189cad487b8f275494843daace</span></button></div></a><div aria-labelledby="job_list___sub_heading_2267_1" data-parent="#job_list___sub_accordion_2267" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2267_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height | margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194829731759Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194830601342Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2268"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2268_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2268_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2268_1"><button class="btn btn-outline-danger"><span class="job_id">2268 : Job ID 02a178b3224f411787023225e1d96487</span></button></div></a><div aria-labelledby="job_list___sub_heading_2268_1" data-parent="#job_list___sub_accordion_2268" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2268_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 | 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2269"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2269_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2269_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2269_1"><button class="btn btn-outline-success"><span class="job_id">2269 : Job ID fef5f61ef0ae4269986530fbbaf0d726</span></button></div></a><div aria-labelledby="job_list___sub_heading_2269_1" data-parent="#job_list___sub_accordion_2269" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2269_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height &amp; margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFF.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194642288933Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T194643144773Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 9 failed, 33 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2270"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2270_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2270_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2270_1"><button class="btn btn-outline-danger"><span class="job_id">2270 : Job ID aba2e0dba4834557afd3c3e4cb37dfca</span></button></div></a><div aria-labelledby="job_list___sub_heading_2270_1" data-parent="#job_list___sub_accordion_2270" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2270_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 &amp; 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2271"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2271_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2271_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2271_1"><button class="btn btn-outline-danger"><span class="job_id">2271 : Job ID 35977923eac2472bb47949e1566a1aff</span></button></div></a><div aria-labelledby="job_list___sub_heading_2271_1" data-parent="#job_list___sub_accordion_2271" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2271_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=278" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (278, 49), end pos: (278, 50)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -275,7 +275,7 @@ page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) margin = 2 - tl_point = (margin, page.rect.height - margin) + tl_point = (margin, page.rect.height ^ margin) annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2272"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2272_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2272_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2272_1"><button class="btn btn-outline-danger"><span class="job_id">2272 : Job ID 7973f64ba4544abba5ce74a321f02a9e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2272_1" data-parent="#job_list___sub_accordion_2272" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2272_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 47), end pos: (299, 48)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_Sub_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 ^ 2, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2273"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2273_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2273_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2273_1"><button class="btn btn-outline-danger"><span class="job_id">2273 : Job ID 0dc9dfa5b6ae4d398b3a99d2f3c869de</span></button></div></a><div aria-labelledby="job_list___sub_heading_2273_1" data-parent="#job_list___sub_accordion_2273" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2273_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str + None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2274"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2274_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2274_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2274_1"><button class="btn btn-outline-danger"><span class="job_id">2274 : Job ID f1a1cc59c6334979b9641ad8c80b660e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2274_1" data-parent="#job_list___sub_accordion_2274" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2274_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str + None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.89s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2275"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2275_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2275_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2275_1"><button class="btn btn-outline-danger"><span class="job_id">2275 : Job ID ab50dac8df1b41149f85ae689f1324fe</span></button></div></a><div aria-labelledby="job_list___sub_heading_2275_1" data-parent="#job_list___sub_accordion_2275" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2275_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str + None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2276"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2276_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2276_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2276_1"><button class="btn btn-outline-danger"><span class="job_id">2276 : Job ID 7657f0a00b5848918ecaaabe2629dcbb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2276_1" data-parent="#job_list___sub_accordion_2276" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2276_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int + None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2277"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2277_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2277_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2277_1"><button class="btn btn-outline-danger"><span class="job_id">2277 : Job ID a09cd7aa6dec4942a35b916ecfa7bc16</span></button></div></a><div aria-labelledby="job_list___sub_heading_2277_1" data-parent="#job_list___sub_accordion_2277" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2277_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 + 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2278"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2278_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2278_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2278_1"><button class="btn btn-outline-danger"><span class="job_id">2278 : Job ID 2f59b0ad27694118bdc52bd5ee45f09a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2278_1" data-parent="#job_list___sub_accordion_2278" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2278_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 + 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2279"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2279_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2279_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2279_1"><button class="btn btn-outline-danger"><span class="job_id">2279 : Job ID 95ac01dcca6b44139417605c4ad41e71</span></button></div></a><div aria-labelledby="job_list___sub_heading_2279_1" data-parent="#job_list___sub_accordion_2279" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2279_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 + 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2280"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2280_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2280_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2280_1"><button class="btn btn-outline-danger"><span class="job_id">2280 : Job ID 4bc1c6c526094030800df035f65279d7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2280_1" data-parent="#job_list___sub_accordion_2280" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2280_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes + None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2281"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2281_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2281_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2281_1"><button class="btn btn-outline-success"><span class="job_id">2281 : Job ID 02b42fd810bb41b9addcb835ffc55053</span></button></div></a><div aria-labelledby="job_list___sub_heading_2281_1" data-parent="#job_list___sub_accordion_2281" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2281_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Add, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes + bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002D5C371BBC0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002D5C264D340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-184/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002D5C264D340&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-184/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2282"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2282_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2282_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2282_1"><button class="btn btn-outline-success"><span class="job_id">2282 : Job ID 8096271d25d044708075131536a6e02a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2282_1" data-parent="#job_list___sub_accordion_2282" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2282_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str - None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145432705114Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T145433594052Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2283"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2283_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2283_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2283_1"><button class="btn btn-outline-danger"><span class="job_id">2283 : Job ID c95aeafca3fb4920af7699c1b57af98a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2283_1" data-parent="#job_list___sub_accordion_2283" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2283_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str - None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2284"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2284_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2284_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2284_1"><button class="btn btn-outline-danger"><span class="job_id">2284 : Job ID 2f70b88eca324e71b236f2c52128f767</span></button></div></a><div aria-labelledby="job_list___sub_heading_2284_1" data-parent="#job_list___sub_accordion_2284" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2284_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str - None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2285"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2285_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2285_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2285_1"><button class="btn btn-outline-danger"><span class="job_id">2285 : Job ID 8f1e1df871334a5b9fbdb7fb66dc0f91</span></button></div></a><div aria-labelledby="job_list___sub_heading_2285_1" data-parent="#job_list___sub_accordion_2285" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2285_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int - None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2286"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2286_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2286_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2286_1"><button class="btn btn-outline-danger"><span class="job_id">2286 : Job ID cec99a8c15404938894d4b26c10eed1a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2286_1" data-parent="#job_list___sub_accordion_2286" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2286_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 - 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.39s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2287"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2287_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2287_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2287_1"><button class="btn btn-outline-success"><span class="job_id">2287 : Job ID fd60ce380b5d4bfdb96a74bfe72179bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2287_1" data-parent="#job_list___sub_accordion_2287" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2287_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 - 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223952567905Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T223953397097Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.46s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2288"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2288_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2288_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2288_1"><button class="btn btn-outline-danger"><span class="job_id">2288 : Job ID 3ab823be052143738e4e613816941263</span></button></div></a><div aria-labelledby="job_list___sub_heading_2288_1" data-parent="#job_list___sub_accordion_2288" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2288_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 - 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2289"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2289_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2289_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2289_1"><button class="btn btn-outline-danger"><span class="job_id">2289 : Job ID 65c76026295e4ab781ff5955ead226c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2289_1" data-parent="#job_list___sub_accordion_2289" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2289_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes - None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2290"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2290_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2290_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2290_1"><button class="btn btn-outline-success"><span class="job_id">2290 : Job ID c85c3e4d8d9149cc99dd4ca96b2524ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_2290_1" data-parent="#job_list___sub_accordion_2290" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2290_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Sub, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes - bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E01DC67F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E01CB8D1C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1652/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E01CB8D1C0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1652/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2291"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2291_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2291_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2291_1"><button class="btn btn-outline-danger"><span class="job_id">2291 : Job ID 3b2f3aa911774ff0b8a09865c98e934f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2291_1" data-parent="#job_list___sub_accordion_2291" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2291_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str * None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2292"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2292_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2292_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2292_1"><button class="btn btn-outline-danger"><span class="job_id">2292 : Job ID eb7f67361feb405a9a0ea758fc1f1cfe</span></button></div></a><div aria-labelledby="job_list___sub_heading_2292_1" data-parent="#job_list___sub_accordion_2292" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2292_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str * None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2293"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2293_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2293_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2293_1"><button class="btn btn-outline-danger"><span class="job_id">2293 : Job ID 921d9987dda5421d905d3bad2b963a81</span></button></div></a><div aria-labelledby="job_list___sub_heading_2293_1" data-parent="#job_list___sub_accordion_2293" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2293_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str * None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2294"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2294_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2294_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2294_1"><button class="btn btn-outline-danger"><span class="job_id">2294 : Job ID 5b3dfda3c9174995b37ed98b0e361383</span></button></div></a><div aria-labelledby="job_list___sub_heading_2294_1" data-parent="#job_list___sub_accordion_2294" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2294_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int * None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2295"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2295_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2295_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2295_1"><button class="btn btn-outline-danger"><span class="job_id">2295 : Job ID 6ef6aa80df474406b99b25baa0ede697</span></button></div></a><div aria-labelledby="job_list___sub_heading_2295_1" data-parent="#job_list___sub_accordion_2295" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2295_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 * 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2296"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2296_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2296_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2296_1"><button class="btn btn-outline-danger"><span class="job_id">2296 : Job ID 6cf25ffa44484e6483adfc9cd7aaddf6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2296_1" data-parent="#job_list___sub_accordion_2296" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2296_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 * 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2297"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2297_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2297_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2297_1"><button class="btn btn-outline-danger"><span class="job_id">2297 : Job ID 91bfc01d1b79473ba65cb484a5250ca5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2297_1" data-parent="#job_list___sub_accordion_2297" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2297_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 * 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 23.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2298"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2298_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2298_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2298_1"><button class="btn btn-outline-danger"><span class="job_id">2298 : Job ID 679abc098a284b82b8110a3597d11f9e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2298_1" data-parent="#job_list___sub_accordion_2298" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2298_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes * None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2299"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2299_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2299_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2299_1"><button class="btn btn-outline-success"><span class="job_id">2299 : Job ID ecd5cfaa82e44996ad13626041b7059f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2299_1" data-parent="#job_list___sub_accordion_2299" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2299_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mul, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes * bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F59568BD40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F5945A9160&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1396/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F5945A9160&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1396/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2300"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2300_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2300_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2300_1"><button class="btn btn-outline-danger"><span class="job_id">2300 : Job ID 35667a42423946678ef772ed722eea75</span></button></div></a><div aria-labelledby="job_list___sub_heading_2300_1" data-parent="#job_list___sub_accordion_2300" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2300_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str / None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2301"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2301_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2301_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2301_1"><button class="btn btn-outline-danger"><span class="job_id">2301 : Job ID 35ac7879fa384ed098d6d2a72ce42e56</span></button></div></a><div aria-labelledby="job_list___sub_heading_2301_1" data-parent="#job_list___sub_accordion_2301" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2301_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str / None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2302"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2302_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2302_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2302_1"><button class="btn btn-outline-success"><span class="job_id">2302 : Job ID 49b8641ea8d74fccb513e908dfc0d32d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2302_1" data-parent="#job_list___sub_accordion_2302" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2302_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str / None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102006775923Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102007693420Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2303"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2303_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2303_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2303_1"><button class="btn btn-outline-success"><span class="job_id">2303 : Job ID f710f8340dbf4baeaaf1ca3f8e87f5d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2303_1" data-parent="#job_list___sub_accordion_2303" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2303_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int / None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T225541923653Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T225542769351Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2304"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2304_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2304_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2304_1"><button class="btn btn-outline-danger"><span class="job_id">2304 : Job ID d911c6da107a44148a025d2e4e2ace8e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2304_1" data-parent="#job_list___sub_accordion_2304" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2304_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 / 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2305"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2305_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2305_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2305_1"><button class="btn btn-outline-danger"><span class="job_id">2305 : Job ID 1c8652ba71fd47b1a69495e202b4afd3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2305_1" data-parent="#job_list___sub_accordion_2305" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2305_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 / 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2306"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2306_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2306_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2306_1"><button class="btn btn-outline-danger"><span class="job_id">2306 : Job ID f0bede8e9e03450ebd1c4ba180ae3883</span></button></div></a><div aria-labelledby="job_list___sub_heading_2306_1" data-parent="#job_list___sub_accordion_2306" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2306_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 / 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2307"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2307_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2307_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2307_1"><button class="btn btn-outline-danger"><span class="job_id">2307 : Job ID ec31bbc1e5cf4107b52aa41539239850</span></button></div></a><div aria-labelledby="job_list___sub_heading_2307_1" data-parent="#job_list___sub_accordion_2307" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2307_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes / None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2308"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2308_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2308_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2308_1"><button class="btn btn-outline-success"><span class="job_id">2308 : Job ID 4ec3c65c53d6444ea648c6574777d9ab</span></button></div></a><div aria-labelledby="job_list___sub_heading_2308_1" data-parent="#job_list___sub_accordion_2308" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2308_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Div, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes / bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C85A6F7E90&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C85A6334A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-962/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C85A6334A0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-962/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2309"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2309_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2309_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2309_1"><button class="btn btn-outline-success"><span class="job_id">2309 : Job ID 9b6c7c64362b455dad240fcac2581247</span></button></div></a><div aria-labelledby="job_list___sub_heading_2309_1" data-parent="#job_list___sub_accordion_2309" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2309_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str // None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T232137128896Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T232137973007Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.53s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2310"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2310_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2310_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2310_1"><button class="btn btn-outline-danger"><span class="job_id">2310 : Job ID 67f02a993b794c3bba260231cb356497</span></button></div></a><div aria-labelledby="job_list___sub_heading_2310_1" data-parent="#job_list___sub_accordion_2310" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2310_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str // None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2311"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2311_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2311_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2311_1"><button class="btn btn-outline-danger"><span class="job_id">2311 : Job ID beaeb1b383334e99a39304858aaf138b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2311_1" data-parent="#job_list___sub_accordion_2311" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2311_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str // None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2312"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2312_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2312_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2312_1"><button class="btn btn-outline-danger"><span class="job_id">2312 : Job ID bbfc7999cd2d46609ad8ec5160cfbf60</span></button></div></a><div aria-labelledby="job_list___sub_heading_2312_1" data-parent="#job_list___sub_accordion_2312" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2312_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int // None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2313"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2313_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2313_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2313_1"><button class="btn btn-outline-danger"><span class="job_id">2313 : Job ID 0f9656eff8f542158057f64643521cb9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2313_1" data-parent="#job_list___sub_accordion_2313" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2313_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 // 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2314"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2314_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2314_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2314_1"><button class="btn btn-outline-danger"><span class="job_id">2314 : Job ID 2d856af9ba5e4f0890b5e68ca2008651</span></button></div></a><div aria-labelledby="job_list___sub_heading_2314_1" data-parent="#job_list___sub_accordion_2314" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2314_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 // 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2315"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2315_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2315_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2315_1"><button class="btn btn-outline-danger"><span class="job_id">2315 : Job ID 5d2a0407df1a410ba257ae2368929626</span></button></div></a><div aria-labelledby="job_list___sub_heading_2315_1" data-parent="#job_list___sub_accordion_2315" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2315_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 // 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.13s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2316"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2316_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2316_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2316_1"><button class="btn btn-outline-success"><span class="job_id">2316 : Job ID a4c61efc5c734e68bda3db8cd9d9c0c1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2316_1" data-parent="#job_list___sub_accordion_2316" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2316_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes // None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102627158776Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T102628065794Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 22.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2317"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2317_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2317_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2317_1"><button class="btn btn-outline-success"><span class="job_id">2317 : Job ID 306caa9decbc442bbadea1de42860e10</span></button></div></a><div aria-labelledby="job_list___sub_heading_2317_1" data-parent="#job_list___sub_accordion_2317" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2317_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_FloorDiv, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes // bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002150534BD10&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000021504268F80&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1816/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000021504268F80&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1816/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2318"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2318_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2318_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2318_1"><button class="btn btn-outline-danger"><span class="job_id">2318 : Job ID 874bc87079074a88bfa2e86f47970a73</span></button></div></a><div aria-labelledby="job_list___sub_heading_2318_1" data-parent="#job_list___sub_accordion_2318" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2318_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str % None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2319"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2319_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2319_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2319_1"><button class="btn btn-outline-danger"><span class="job_id">2319 : Job ID 06a06510445f412e9c0637148e7b3af8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2319_1" data-parent="#job_list___sub_accordion_2319" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2319_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str % None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2320"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2320_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2320_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2320_1"><button class="btn btn-outline-danger"><span class="job_id">2320 : Job ID 4bfd0686f3534e4ab9772851bef19c28</span></button></div></a><div aria-labelledby="job_list___sub_heading_2320_1" data-parent="#job_list___sub_accordion_2320" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2320_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str % None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2321"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2321_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2321_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2321_1"><button class="btn btn-outline-danger"><span class="job_id">2321 : Job ID 4618b7b9f7da4baab14635499813fc88</span></button></div></a><div aria-labelledby="job_list___sub_heading_2321_1" data-parent="#job_list___sub_accordion_2321" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2321_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int % None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2322"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2322_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2322_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2322_1"><button class="btn btn-outline-danger"><span class="job_id">2322 : Job ID cf3c7a6430cd42f490d3a2ebc3f19a8f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2322_1" data-parent="#job_list___sub_accordion_2322" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2322_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 % 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2323"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2323_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2323_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2323_1"><button class="btn btn-outline-danger"><span class="job_id">2323 : Job ID 5ac2841484c6448b883874df68f653c7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2323_1" data-parent="#job_list___sub_accordion_2323" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2323_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 % 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2324"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2324_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2324_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2324_1"><button class="btn btn-outline-danger"><span class="job_id">2324 : Job ID bd3f01e89fbe41a98a17d369d559ae08</span></button></div></a><div aria-labelledby="job_list___sub_heading_2324_1" data-parent="#job_list___sub_accordion_2324" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2324_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 % 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2325"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2325_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2325_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2325_1"><button class="btn btn-outline-danger"><span class="job_id">2325 : Job ID 23f65796293d4ffc9d9eeaa04cf24962</span></button></div></a><div aria-labelledby="job_list___sub_heading_2325_1" data-parent="#job_list___sub_accordion_2325" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2325_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes % None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2326"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2326_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2326_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2326_1"><button class="btn btn-outline-success"><span class="job_id">2326 : Job ID e6257a41810643fe8003b68f264c41f0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2326_1" data-parent="#job_list___sub_accordion_2326" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2326_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Mod, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes % bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000012F614E7F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000012F614233E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2131/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000012F614233E0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2131/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2327"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2327_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2327_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2327_1"><button class="btn btn-outline-danger"><span class="job_id">2327 : Job ID 145384bbf1bd4536a831637cbb313f5a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2327_1" data-parent="#job_list___sub_accordion_2327" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2327_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ** None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2328"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2328_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2328_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2328_1"><button class="btn btn-outline-danger"><span class="job_id">2328 : Job ID 1b25bb2e96834d8a89a74606f666b4a0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2328_1" data-parent="#job_list___sub_accordion_2328" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2328_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ** None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2329"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2329_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2329_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2329_1"><button class="btn btn-outline-danger"><span class="job_id">2329 : Job ID 231a9321de764933a5e4a77e8f0aa4a5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2329_1" data-parent="#job_list___sub_accordion_2329" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2329_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ** None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2330"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2330_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2330_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2330_1"><button class="btn btn-outline-danger"><span class="job_id">2330 : Job ID 6786fe5b077f4f0886e82fb365219b4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2330_1" data-parent="#job_list___sub_accordion_2330" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2330_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int ** None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2331"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2331_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2331_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2331_1"><button class="btn btn-outline-success"><span class="job_id">2331 : Job ID d9a9bc9190994f83b8a9ddcef831eb60</span></button></div></a><div aria-labelledby="job_list___sub_heading_2331_1" data-parent="#job_list___sub_accordion_2331" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2331_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 ** 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132757952247Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T132758848073Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2332"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2332_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2332_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2332_1"><button class="btn btn-outline-success"><span class="job_id">2332 : Job ID 278542dcad2d4dfb84c6dc3ff51e5762</span></button></div></a><div aria-labelledby="job_list___sub_heading_2332_1" data-parent="#job_list___sub_accordion_2332" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2332_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 ** 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185850500012Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T185851332731Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2333"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2333_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2333_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2333_1"><button class="btn btn-outline-danger"><span class="job_id">2333 : Job ID ab7ded8a785f4a458b8c95d06cc5ef86</span></button></div></a><div aria-labelledby="job_list___sub_heading_2333_1" data-parent="#job_list___sub_accordion_2333" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2333_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 ** 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2334"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2334_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2334_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2334_1"><button class="btn btn-outline-danger"><span class="job_id">2334 : Job ID f10daa69a04e491e92065a3485acb6a2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2334_1" data-parent="#job_list___sub_accordion_2334" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2334_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes ** None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2335"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2335_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2335_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2335_1"><button class="btn btn-outline-success"><span class="job_id">2335 : Job ID fee8e515420b42f99a8c9e32ddcd6dcf</span></button></div></a><div aria-labelledby="job_list___sub_heading_2335_1" data-parent="#job_list___sub_accordion_2335" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2335_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_Pow, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes ** bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001ABD6857F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001ABD6793500&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1684/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001ABD6793500&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1684/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2336"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2336_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2336_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2336_1"><button class="btn btn-outline-danger"><span class="job_id">2336 : Job ID 52503b0d8bdb494294ca85f636910c4a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2336_1" data-parent="#job_list___sub_accordion_2336" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2336_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &gt;&gt; None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2337"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2337_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2337_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2337_1"><button class="btn btn-outline-danger"><span class="job_id">2337 : Job ID d8f4b5c05cae40a3b115fe2c9914495b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2337_1" data-parent="#job_list___sub_accordion_2337" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2337_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2338"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2338_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2338_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2338_1"><button class="btn btn-outline-danger"><span class="job_id">2338 : Job ID c686dfe6a7cf4c9e9c4c9ba502f45d9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2338_1" data-parent="#job_list___sub_accordion_2338" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2338_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &gt;&gt; None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2339"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2339_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2339_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2339_1"><button class="btn btn-outline-success"><span class="job_id">2339 : Job ID f150fd950cad4042b0662dfaa5d65e46</span></button></div></a><div aria-labelledby="job_list___sub_heading_2339_1" data-parent="#job_list___sub_accordion_2339" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2339_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int &gt;&gt; None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165429428557Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T165430285990Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2340"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2340_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2340_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2340_1"><button class="btn btn-outline-danger"><span class="job_id">2340 : Job ID 1466b025d37b4f2d9185b28af4fa8314</span></button></div></a><div aria-labelledby="job_list___sub_heading_2340_1" data-parent="#job_list___sub_accordion_2340" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2340_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 &gt;&gt; 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2341"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2341_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2341_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2341_1"><button class="btn btn-outline-danger"><span class="job_id">2341 : Job ID f0263dd404444ceaa162e445b2491a75</span></button></div></a><div aria-labelledby="job_list___sub_heading_2341_1" data-parent="#job_list___sub_accordion_2341" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2341_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 &gt;&gt; 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 23.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2342"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2342_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2342_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2342_1"><button class="btn btn-outline-danger"><span class="job_id">2342 : Job ID a2d242f90f9a4126ba00177dad5fac1e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2342_1" data-parent="#job_list___sub_accordion_2342" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2342_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 &gt;&gt; 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.57s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2343"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2343_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2343_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2343_1"><button class="btn btn-outline-danger"><span class="job_id">2343 : Job ID d6e73c8641a24f839b910316b2f94f5f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2343_1" data-parent="#job_list___sub_accordion_2343" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2343_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes &gt;&gt; None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2344"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2344_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2344_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2344_1"><button class="btn btn-outline-success"><span class="job_id">2344 : Job ID c7043b8d70034941838d20db3fc59a28</span></button></div></a><div aria-labelledby="job_list___sub_heading_2344_1" data-parent="#job_list___sub_accordion_2344" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2344_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_RShift, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes &gt;&gt; bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002D202D97E00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002D202CD3350&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1913/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002D202CD3350&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1913/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2345"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2345_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2345_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2345_1"><button class="btn btn-outline-danger"><span class="job_id">2345 : Job ID e7a28c7e94d848c3b2350814f23e435d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2345_1" data-parent="#job_list___sub_accordion_2345" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2345_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &lt;&lt; None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2346"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2346_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2346_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2346_1"><button class="btn btn-outline-danger"><span class="job_id">2346 : Job ID 566143c6da8c45df9eaccc5504f00551</span></button></div></a><div aria-labelledby="job_list___sub_heading_2346_1" data-parent="#job_list___sub_accordion_2346" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2346_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2347"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2347_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2347_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2347_1"><button class="btn btn-outline-danger"><span class="job_id">2347 : Job ID c7a27d95d2144870a30b9d3e90756545</span></button></div></a><div aria-labelledby="job_list___sub_heading_2347_1" data-parent="#job_list___sub_accordion_2347" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2347_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &lt;&lt; None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2348"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2348_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2348_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2348_1"><button class="btn btn-outline-danger"><span class="job_id">2348 : Job ID 6e9d6938197e4ca6aa1f60191f56c440</span></button></div></a><div aria-labelledby="job_list___sub_heading_2348_1" data-parent="#job_list___sub_accordion_2348" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2348_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int &lt;&lt; None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2349"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2349_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2349_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2349_1"><button class="btn btn-outline-danger"><span class="job_id">2349 : Job ID 674741f8a6b34876b7b6ab34e273a64d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2349_1" data-parent="#job_list___sub_accordion_2349" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2349_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 &lt;&lt; 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2350"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2350_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2350_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2350_1"><button class="btn btn-outline-danger"><span class="job_id">2350 : Job ID 613f02fac7ed44a78e0e17f0ca9ac2fe</span></button></div></a><div aria-labelledby="job_list___sub_heading_2350_1" data-parent="#job_list___sub_accordion_2350" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2350_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 &lt;&lt; 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2351"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2351_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2351_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2351_1"><button class="btn btn-outline-danger"><span class="job_id">2351 : Job ID fc3c86cc3b8746d5a049a6112859ee92</span></button></div></a><div aria-labelledby="job_list___sub_heading_2351_1" data-parent="#job_list___sub_accordion_2351" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2351_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 &lt;&lt; 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2352"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2352_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2352_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2352_1"><button class="btn btn-outline-danger"><span class="job_id">2352 : Job ID c808088fd0924d70a7e1942cce303719</span></button></div></a><div aria-labelledby="job_list___sub_heading_2352_1" data-parent="#job_list___sub_accordion_2352" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2352_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes &lt;&lt; None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2353"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2353_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2353_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2353_1"><button class="btn btn-outline-success"><span class="job_id">2353 : Job ID e15cb901169443ddac372e69f0f1f6ab</span></button></div></a><div aria-labelledby="job_list___sub_heading_2353_1" data-parent="#job_list___sub_accordion_2353" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2353_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_LShift, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes &lt;&lt; bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000029CACA67D10&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000029CAC9A3410&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1183/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000029CAC9A3410&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1183/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2354"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2354_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2354_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2354_1"><button class="btn btn-outline-danger"><span class="job_id">2354 : Job ID f3d47313742b41c18c1656c8708c6faf</span></button></div></a><div aria-labelledby="job_list___sub_heading_2354_1" data-parent="#job_list___sub_accordion_2354" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2354_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str &amp; None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2355"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2355_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2355_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2355_1"><button class="btn btn-outline-danger"><span class="job_id">2355 : Job ID a92703139b604886a3b35567dac463ee</span></button></div></a><div aria-labelledby="job_list___sub_heading_2355_1" data-parent="#job_list___sub_accordion_2355" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2355_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2356"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2356_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2356_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2356_1"><button class="btn btn-outline-danger"><span class="job_id">2356 : Job ID e0a2607ceda14fb78415228946f591c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2356_1" data-parent="#job_list___sub_accordion_2356" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2356_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str &amp; None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.43s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2357"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2357_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2357_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2357_1"><button class="btn btn-outline-danger"><span class="job_id">2357 : Job ID 3ba8ca5987dc4b3695bc1cc991a4e0ff</span></button></div></a><div aria-labelledby="job_list___sub_heading_2357_1" data-parent="#job_list___sub_accordion_2357" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2357_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int &amp; None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2358"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2358_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2358_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2358_1"><button class="btn btn-outline-danger"><span class="job_id">2358 : Job ID d49a0c0cddc945c08bd22968e1d88081</span></button></div></a><div aria-labelledby="job_list___sub_heading_2358_1" data-parent="#job_list___sub_accordion_2358" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2358_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 &amp; 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2359"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2359_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2359_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2359_1"><button class="btn btn-outline-danger"><span class="job_id">2359 : Job ID cfe8becccb8d42e98ac376c082b2a4be</span></button></div></a><div aria-labelledby="job_list___sub_heading_2359_1" data-parent="#job_list___sub_accordion_2359" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2359_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 &amp; 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2360"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2360_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2360_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2360_1"><button class="btn btn-outline-danger"><span class="job_id">2360 : Job ID 1fffa1d03a5343be81cc3038d29f60bc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2360_1" data-parent="#job_list___sub_accordion_2360" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2360_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 &amp; 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2361"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2361_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2361_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2361_1"><button class="btn btn-outline-success"><span class="job_id">2361 : Job ID f69859cb9097435a9fbdf25acc919b4b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2361_1" data-parent="#job_list___sub_accordion_2361" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2361_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes &amp; None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103103680170Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T103104553314Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.55s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2362"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2362_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2362_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2362_1"><button class="btn btn-outline-success"><span class="job_id">2362 : Job ID 7c44cd38ea704bb0b2d8f3582585339c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2362_1" data-parent="#job_list___sub_accordion_2362" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2362_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitAnd, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes &amp; bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BDB35B7FE0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BDB34F3350&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1584/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BDB34F3350&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1584/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2363"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2363_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2363_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2363_1"><button class="btn btn-outline-danger"><span class="job_id">2363 : Job ID 79719422a0af43338102801fde7f8b0e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2363_1" data-parent="#job_list___sub_accordion_2363" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2363_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=77" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (77, 26), end pos: (77, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -74,7 +74,7 @@ pdf: PdfSource, secret: str, key: str, - intended_for: str | None = None, + intended_for: str ^ None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2364"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2364_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2364_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2364_1"><button class="btn btn-outline-danger"><span class="job_id">2364 : Job ID ddcef4d6773c4f64a0fbc091929a4015</span></button></div></a><div aria-labelledby="job_list___sub_heading_2364_1" data-parent="#job_list___sub_accordion_2364" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2364_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=78" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (78, 22), end pos: (78, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -75,7 +75,7 @@ secret: str, key: str, intended_for: str | None = None, - position: str | None = None, + position: str ^ None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2365"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2365_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2365_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2365_1"><button class="btn btn-outline-danger"><span class="job_id">2365 : Job ID 18c4e7ea5765443aa843589b4aae69b1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2365_1" data-parent="#job_list___sub_accordion_2365" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2365_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=161" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (161, 22), end pos: (161, 23)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -158,7 +158,7 @@ def is_watermark_applicable( self, pdf: PdfSource, - position: str | None = None, + position: str ^ None = None, ) -&gt; bool: if not HAS_PYMUPDF: return False</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2366"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2366_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2366_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2366_1"><button class="btn btn-outline-danger"><span class="job_id">2366 : Job ID fee05750570a4908b348ddc1ed0a02c3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2366_1" data-parent="#job_list___sub_accordion_2366" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2366_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=233" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (233, 61), end pos: (233, 62)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -230,7 +230,7 @@ # Internal helpers # --------------------- def _derive_key( - self, password: str, salt: bytes, iter_override: int | None = None + self, password: str, salt: bytes, iter_override: int ^ None = None ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(),</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2367"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2367_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2367_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2367_1"><button class="btn btn-outline-danger"><span class="job_id">2367 : Job ID 1ab5d5757dda43ea9e5dd087114d9437</span></button></div></a><div aria-labelledby="job_list___sub_heading_2367_1" data-parent="#job_list___sub_accordion_2367" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2367_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 26), end pos: (282, 27)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 ^ 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2368"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2368_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2368_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2368_1"><button class="btn btn-outline-danger"><span class="job_id">2368 : Job ID 566519d46aee4bda883ff95735f04e90</span></button></div></a><div aria-labelledby="job_list___sub_heading_2368_1" data-parent="#job_list___sub_accordion_2368" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2368_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 30), end pos: (282, 31)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 ^ 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2369"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2369_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2369_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2369_1"><button class="btn btn-outline-danger"><span class="job_id">2369 : Job ID 2af6dd55ce6c4c0ab4a512c9aabec555</span></button></div></a><div aria-labelledby="job_list___sub_heading_2369_1" data-parent="#job_list___sub_accordion_2369" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2369_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 35), end pos: (282, 36)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 ^ 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.27s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2370"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2370_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2370_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2370_1"><button class="btn btn-outline-danger"><span class="job_id">2370 : Job ID 96a2cb4a4301455d87a6477087ad46b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2370_1" data-parent="#job_list___sub_accordion_2370" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2370_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=311" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (311, 64), end pos: (311, 65)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -308,7 +308,7 @@ logger.debug("Adding invisible annotation failed: %s", exc) return None - def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes | None: + def _extract_manifest(self, doc: pymupdf.Document) -&gt; bytes ^ None: # Primary: embedded file logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.21s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2371"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2371_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2371_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2371_1"><button class="btn btn-outline-success"><span class="job_id">2371 : Job ID 3a224146e21a442889ec81a5606bbf37</span></button></div></a><div aria-labelledby="job_list___sub_heading_2371_1" data-parent="#job_list___sub_accordion_2371" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2371_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 52), end pos: (319, 53)</button></a></pre><pre>operator: core/ReplaceBinaryOperator_BitOr_BitXor, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if isinstance(file_bytes, bytes ^ bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000288DF93BB00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000288DF8730E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1972/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000288DF8730E0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1972/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2372"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2372_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2372_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2372_1"><button class="btn btn-outline-success"><span class="job_id">2372 : Job ID 54379bf55f494f66a99af7979f2ff66a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2372_1" data-parent="#job_list___sub_accordion_2372" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2372_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 30), end pos: (99, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count != 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..................... [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000027042747890&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002704167D250&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: signed-annots: watermarked bytes should not be smaller than input E assert 2186 &gt;= 38471 E + where 2186 = len(b'%PDF-1.7\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Catalog/Pages 2 0 R/Names&lt;&lt;/EmbeddedFiles&lt;&lt;/Names[(WM-TATOU-SIGNED-v...Size 9/Root 1 0 R/ID[&lt;C2A0C293C3ADC289C2BB794500C2B3C3&gt;&lt;2A8BE7623BA2C17A03E5FC6A1452B0A4&gt;]&gt;&gt;\nstartxref\n1871\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] 1 failed, 41 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2373"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2373_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2373_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2373_1"><button class="btn btn-outline-danger"><span class="job_id">2373 : Job ID 96beae4b33c64237a37d3af488206040</span></button></div></a><div aria-labelledby="job_list___sub_heading_2373_1" data-parent="#job_list___sub_accordion_2373" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2373_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 30), end pos: (273, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_NotEq, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count != 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2374"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2374_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2374_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2374_1"><button class="btn btn-outline-danger"><span class="job_id">2374 : Job ID 79fe44812e9e4873af425db894beb6b6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2374_1" data-parent="#job_list___sub_accordion_2374" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2374_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 30), end pos: (99, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count &lt; 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2375"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2375_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2375_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2375_1"><button class="btn btn-outline-danger"><span class="job_id">2375 : Job ID 8583ab2e4c8a4478a9500167493b6225</span></button></div></a><div aria-labelledby="job_list___sub_heading_2375_1" data-parent="#job_list___sub_accordion_2375" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2375_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 30), end pos: (273, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Lt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count &lt; 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2376"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2376_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2376_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2376_1"><button class="btn btn-outline-danger"><span class="job_id">2376 : Job ID 2e91ccf51bc443f3b48df71869549681</span></button></div></a><div aria-labelledby="job_list___sub_heading_2376_1" data-parent="#job_list___sub_accordion_2376" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2376_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 30), end pos: (99, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count &lt;= 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2377"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2377_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2377_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2377_1"><button class="btn btn-outline-danger"><span class="job_id">2377 : Job ID d50ec894a7ed4555a75a149fe10f574a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2377_1" data-parent="#job_list___sub_accordion_2377" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2377_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 30), end pos: (273, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_LtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count &lt;= 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.98s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2378"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2378_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2378_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2378_1"><button class="btn btn-outline-success"><span class="job_id">2378 : Job ID bfb91350faaa4477a2cd654a5bd72b1f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2378_1" data-parent="#job_list___sub_accordion_2378" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2378_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 30), end pos: (99, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count &gt; 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..................... [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016A8CBE7890&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000016A8CB23410&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: signed-annots: watermarked bytes should not be smaller than input E assert 2185 &gt;= 38471 E + where 2185 = len(b'%PDF-1.7\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Catalog/Pages 2 0 R/Names&lt;&lt;/EmbeddedFiles&lt;&lt;/Names[(WM-TATOU-SIGNED-v...Size 9/Root 1 0 R/ID[&lt;C2BFC3BDC399C38E52C3BA681D43C39A&gt;&lt;2A55B207B383C5F8725FB840FCE3A451&gt;]&gt;&gt;\nstartxref\n1870\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2379"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2379_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2379_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2379_1"><button class="btn btn-outline-danger"><span class="job_id">2379 : Job ID 238aa8bc81944f6e83103c19cd6d9353</span></button></div></a><div aria-labelledby="job_list___sub_heading_2379_1" data-parent="#job_list___sub_accordion_2379" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2379_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 30), end pos: (273, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_Gt, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count &gt; 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2380"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2380_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2380_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2380_1"><button class="btn btn-outline-success"><span class="job_id">2380 : Job ID 2a2d6e32aa8f402fbf2ce027ee70f5e4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2380_1" data-parent="#job_list___sub_accordion_2380" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2380_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 30), end pos: (99, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count &gt;= 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..................... [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F2EE11B530&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F2EE053020&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: signed-annots: watermarked bytes should not be smaller than input E assert 2185 &gt;= 38471 E + where 2185 = len(b'%PDF-1.7\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Catalog/Pages 2 0 R/Names&lt;&lt;/EmbeddedFiles&lt;&lt;/Names[(WM-TATOU-SIGNED-v...Size 9/Root 1 0 R/ID[&lt;C388C29B55C39163012DC388C39BC389&gt;&lt;52934FAAE32AA9422BED64B2BCDA986C&gt;]&gt;&gt;\nstartxref\n1870\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2381"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2381_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2381_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2381_1"><button class="btn btn-outline-danger"><span class="job_id">2381 : Job ID a3d940ed3cdf4b7b86dd6b397af6aa75</span></button></div></a><div aria-labelledby="job_list___sub_heading_2381_1" data-parent="#job_list___sub_accordion_2381" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2381_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 30), end pos: (273, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Eq_GtE, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count &gt;= 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2382"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2382_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2382_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2382_1"><button class="btn btn-outline-success"><span class="job_id">2382 : Job ID 93254b9082244841abbce8e1f6eb9013</span></button></div></a><div aria-labelledby="job_list___sub_heading_2382_1" data-parent="#job_list___sub_accordion_2382" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2382_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual == expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000024142727E30&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000241415ACE60&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2084/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000241415ACE60&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual == expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.33s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2383"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2383_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2383_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2383_1"><button class="btn btn-outline-danger"><span class="job_id">2383 : Job ID cbc94853b2e34bfca70948414c24f548</span></button></div></a><div aria-labelledby="job_list___sub_heading_2383_1" data-parent="#job_list___sub_accordion_2383" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2383_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual &lt; expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.65s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2384"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2384_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2384_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2384_1"><button class="btn btn-outline-success"><span class="job_id">2384 : Job ID 0a65f8b57dce402abfd0acd7536fbf7c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2384_1" data-parent="#job_list___sub_accordion_2384" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2384_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual &lt;= expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C6B0F57D40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C6AFE8D2B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1874/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C6AFE8D2B0&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual &lt;= expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2385"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2385_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2385_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2385_1"><button class="btn btn-outline-danger"><span class="job_id">2385 : Job ID c389a5ff2a5b40178d2f0db0066de1de</span></button></div></a><div aria-labelledby="job_list___sub_heading_2385_1" data-parent="#job_list___sub_accordion_2385" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2385_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual &gt; expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2386"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2386_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2386_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2386_1"><button class="btn btn-outline-success"><span class="job_id">2386 : Job ID a90df330fe484d31a9f2a2158a537a18</span></button></div></a><div aria-labelledby="job_list___sub_heading_2386_1" data-parent="#job_list___sub_accordion_2386" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2386_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual &gt;= expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000221898D7E60&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022186D10A10&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1682/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022186D10A10&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual &gt;= expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2387"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2387_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2387_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2387_1"><button class="btn btn-outline-danger"><span class="job_id">2387 : Job ID 834054a14c0449bf9f745bebf278dfda</span></button></div></a><div aria-labelledby="job_list___sub_heading_2387_1" data-parent="#job_list___sub_accordion_2387" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2387_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual is expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2388"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2388_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2388_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2388_1"><button class="btn btn-outline-success"><span class="job_id">2388 : Job ID 9da59943f62a40f5aa0e7ff5946552b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2388_1" data-parent="#job_list___sub_accordion_2388" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2388_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 22), end pos: (343, 24)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_NotEq_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if actual is not expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001EA3AA3BC80&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001EA3A9733B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1463/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001EA3A9733B0&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual is not expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2389"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2389_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2389_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2389_1"><button class="btn btn-outline-danger"><span class="job_id">2389 : Job ID 91e764d5b7fe40e0bd5a31ceb992bef9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2389_1" data-parent="#job_list___sub_accordion_2389" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2389_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 30), end pos: (264, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) == 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2390"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2390_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2390_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2390_1"><button class="btn btn-outline-danger"><span class="job_id">2390 : Job ID e41975a831bb49bea5a0669484429e78</span></button></div></a><div aria-labelledby="job_list___sub_heading_2390_1" data-parent="#job_list___sub_accordion_2390" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2390_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 30), end pos: (264, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) != 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.25s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2391"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2391_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2391_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2391_1"><button class="btn btn-outline-danger"><span class="job_id">2391 : Job ID fe05c62aa0ca4e7cb6539b99ed6bc7e9</span></button></div></a><div aria-labelledby="job_list___sub_heading_2391_1" data-parent="#job_list___sub_accordion_2391" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2391_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 30), end pos: (264, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) &lt;= 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.03s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2392"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2392_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2392_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2392_1"><button class="btn btn-outline-danger"><span class="job_id">2392 : Job ID b717d515d29441cd85f8fdd24e6188e6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2392_1" data-parent="#job_list___sub_accordion_2392" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2392_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 30), end pos: (264, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) &gt; 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2393"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2393_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2393_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2393_1"><button class="btn btn-outline-danger"><span class="job_id">2393 : Job ID ce9d2f42b13c46d484e01aaba4de170b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2393_1" data-parent="#job_list___sub_accordion_2393" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2393_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 30), end pos: (264, 31)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Lt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) &gt;= 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2394"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2394_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2394_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2394_1"><button class="btn btn-outline-danger"><span class="job_id">2394 : Job ID 329042ad8a8d455dad31ea188b2aa054</span></button></div></a><div aria-labelledby="job_list___sub_heading_2394_1" data-parent="#job_list___sub_accordion_2394" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2394_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 26), end pos: (201, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count == 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2395"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2395_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2395_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2395_1"><button class="btn btn-outline-success"><span class="job_id">2395 : Job ID 231f57acd30e4b9a903b57db476737a5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2395_1" data-parent="#job_list___sub_accordion_2395" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2395_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 26), end pos: (201, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count != 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002321304BBF0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000023212F83050&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-711/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000023212F83050&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-711/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count != 0 or iter_count &gt; 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2396"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2396_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2396_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2396_1"><button class="btn btn-outline-danger"><span class="job_id">2396 : Job ID daa36aa8610e4b829cf5efa33b722a61</span></button></div></a><div aria-labelledby="job_list___sub_heading_2396_1" data-parent="#job_list___sub_accordion_2396" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2396_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 26), end pos: (201, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt; 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2397"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2397_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2397_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2397_1"><button class="btn btn-outline-success"><span class="job_id">2397 : Job ID 91fa055c933b4beebbe31101fc0bd024</span></button></div></a><div aria-labelledby="job_list___sub_heading_2397_1" data-parent="#job_list___sub_accordion_2397" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2397_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 26), end pos: (201, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &gt; 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BECF8C7DD0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BECE7FD3A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1176/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BECE7FD3A0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1176/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &gt; 0 or iter_count &gt; 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.09s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2398"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2398_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2398_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2398_1"><button class="btn btn-outline-success"><span class="job_id">2398 : Job ID f4942a8be3c54ca292c77f882f44a6eb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2398_1" data-parent="#job_list___sub_accordion_2398" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2398_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 26), end pos: (201, 28)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_LtE_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &gt;= 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002509BB2BD70&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000025098FD5EB0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2478/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000025098FD5EB0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2478/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &gt;= 0 or iter_count &gt; 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2399"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2399_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2399_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2399_1"><button class="btn btn-outline-danger"><span class="job_id">2399 : Job ID 91498caf9a3846d1a90e10e795cb58b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2399_1" data-parent="#job_list___sub_accordion_2399" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2399_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 45), end pos: (201, 46)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count == 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2400"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2400_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2400_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2400_1"><button class="btn btn-outline-success"><span class="job_id">2400 : Job ID e94b16542fa14045bcb30d34eee8afdd</span></button></div></a><div aria-labelledby="job_list___sub_heading_2400_1" data-parent="#job_list___sub_accordion_2400" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2400_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 45), end pos: (201, 46)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count != 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026D2381BBF0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000026D20C453D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-803/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000026D20C453D0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-803/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &lt;= 0 or iter_count != 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2401"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2401_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2401_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2401_1"><button class="btn btn-outline-success"><span class="job_id">2401 : Job ID 1a3dc07b72aa4b909b865a0c3f3d11f1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2401_1" data-parent="#job_list___sub_accordion_2401" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2401_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 45), end pos: (201, 46)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count &lt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E1F93C7EC0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E1F93036B0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-825/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E1F93036B0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-825/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &lt;= 0 or iter_count &lt; 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2402"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2402_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2402_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2402_1"><button class="btn btn-outline-success"><span class="job_id">2402 : Job ID 24821b5af692490da0c1005652db438e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2402_1" data-parent="#job_list___sub_accordion_2402" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2402_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 45), end pos: (201, 46)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count &lt;= 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CD15147E90&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001CD14069460&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-685/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001CD14069460&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-685/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &lt;= 0 or iter_count &lt;= 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2403"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2403_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2403_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2403_1"><button class="btn btn-outline-danger"><span class="job_id">2403 : Job ID 54b27394c62a486c9d56b150eb3b2c5a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2403_1" data-parent="#job_list___sub_accordion_2403" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2403_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 45), end pos: (201, 46)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Gt_GtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count &gt;= 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2404"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2404_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2404_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2404_1"><button class="btn btn-outline-danger"><span class="job_id">2404 : Job ID 72d2d1ea7d104bd6826f7617b0bd490c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2404_1" data-parent="#job_list___sub_accordion_2404" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2404_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Eq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) == self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2405"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2405_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2405_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2405_1"><button class="btn btn-outline-danger"><span class="job_id">2405 : Job ID 09a7e18ece624287b1e5bf82158fcfad</span></button></div></a><div aria-labelledby="job_list___sub_heading_2405_1" data-parent="#job_list___sub_accordion_2405" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2405_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_NotEq, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) != self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2406"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2406_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2406_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2406_1"><button class="btn btn-outline-success"><span class="job_id">2406 : Job ID e3d3b6b20ab5492399fcb1e67f34607b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2406_1" data-parent="#job_list___sub_accordion_2406" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2406_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Lt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) &lt; self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181141749523Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181142581856Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.48s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2407"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2407_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2407_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2407_1"><button class="btn btn-outline-danger"><span class="job_id">2407 : Job ID 8a4fa11859be4511ad41a7f2b2607ad0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2407_1" data-parent="#job_list___sub_accordion_2407" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2407_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_LtE, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) &lt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2408"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2408_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2408_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2408_1"><button class="btn btn-outline-success"><span class="job_id">2408 : Job ID e5ca76e12a8c4c63a07c3b7216a93135</span></button></div></a><div aria-labelledby="job_list___sub_heading_2408_1" data-parent="#job_list___sub_accordion_2408" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2408_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Gt, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) &gt; self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133528635666Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T133529522752Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.58s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2409"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2409_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2409_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2409_1"><button class="btn btn-outline-danger"><span class="job_id">2409 : Job ID 139bdfefb224455fb502bba75473e373</span></button></div></a><div aria-labelledby="job_list___sub_heading_2409_1" data-parent="#job_list___sub_accordion_2409" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2409_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_Is, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) is self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.81s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2410"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2410_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2410_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2410_1"><button class="btn btn-outline-success"><span class="job_id">2410 : Job ID f914c7fb5ad841228905cfbae705e261</span></button></div></a><div aria-labelledby="job_list___sub_heading_2410_1" data-parent="#job_list___sub_accordion_2410" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2410_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 24), end pos: (251, 26)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_GtE_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if len(out) is not self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192808186834Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192809085180Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.45s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2411"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2411_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2411_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2411_1"><button class="btn btn-outline-success"><span class="job_id">2411 : Job ID aae1aeb922c242879e106ab91d415f15</span></button></div></a><div aria-labelledby="job_list___sub_heading_2411_1" data-parent="#job_list___sub_accordion_2411" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2411_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=187" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (187, 30), end pos: (187, 32)</button></a></pre><pre>operator: core/ReplaceComparisonOperator_Is_IsNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -184,7 +184,7 @@ doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) - if manifest_bytes is None: + if manifest_bytes is not None: raise SecretNotFoundError("Signed annotation watermark not found") try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000016894687F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000168945C34D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-946/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000168945C34D0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-946/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is not None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2412"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2412_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2412_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2412_1"><button class="btn btn-outline-success"><span class="job_id">2412 : Job ID 6f9b9b38eec049dba644a89e081f9a93</span></button></div></a><div aria-labelledby="job_list___sub_heading_2412_1" data-parent="#job_list___sub_accordion_2412" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2412_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (80, 11), end pos: (80, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -77,7 +77,7 @@ intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: - if not HAS_PYMUPDF: + if HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000260FC1FB8C0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000260FB234380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000260FB234380&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:81: WatermarkingError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000260FC1FBE30&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000260FB234380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-585/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000260FB234380&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:81: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2413"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2413_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2413_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2413_1"><button class="btn btn-outline-success"><span class="job_id">2413 : Job ID d6fe48f58dbd429abde68c824cc04fff</span></button></div></a><div aria-labelledby="job_list___sub_heading_2413_1" data-parent="#job_list___sub_accordion_2413" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2413_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (82, 11), end pos: (82, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -79,7 +79,7 @@ ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not secret or not isinstance(secret, str): + if secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022CB3EC7830&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022CB2DFD1F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022CB2DFD1F0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if secret or not isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022CB3EC7DA0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022CB2DFD1F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-616/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022CB2DFD1F0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if secret or not isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2414"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2414_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2414_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2414_1"><button class="btn btn-outline-success"><span class="job_id">2414 : Job ID 5e3711268d8741ea970007bc0f5051d1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2414_1" data-parent="#job_list___sub_accordion_2414" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2414_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (82, 25), end pos: (82, 28)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -79,7 +79,7 @@ ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not secret or not isinstance(secret, str): + if not secret or isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF........F..F.................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T183017996706Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T183018842277Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000263ADC3B560&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263ADB73080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263ADB73080&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000263ADC3BAD0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263ADB73080&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1460/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263ADB73080&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 10 failed, 32 passed, 23 warnings in 20.40s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2415"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2415_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2415_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2415_1"><button class="btn btn-outline-success"><span class="job_id">2415 : Job ID 5f1788c651e346539cf4c8dbd4677430</span></button></div></a><div aria-labelledby="job_list___sub_heading_2415_1" data-parent="#job_list___sub_accordion_2415" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2415_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (84, 11), end pos: (84, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -81,7 +81,7 @@ raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") - if not key or not isinstance(key, str): + if key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002B40B5B77D0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002B40B4F34A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002B40B4F34A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002B40B5B7D40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002B40B4F34A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1880/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002B40B4F34A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2416"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2416_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2416_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2416_1"><button class="btn btn-outline-success"><span class="job_id">2416 : Job ID 6d07a348bee9446286f1f19a9efc917b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2416_1" data-parent="#job_list___sub_accordion_2416" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2416_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (84, 22), end pos: (84, 25)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -81,7 +81,7 @@ raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") - if not key or not isinstance(key, str): + if not key or isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000263222A7920&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263221E34A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263221E34A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000263222A7E90&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263221E34A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-448/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263221E34A0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2417"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2417_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2417_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2417_1"><button class="btn btn-outline-danger"><span class="job_id">2417 : Job ID fbf6e6c14691464e9bf2ba5baae1b895</span></button></div></a><div aria-labelledby="job_list___sub_heading_2417_1" data-parent="#job_list___sub_accordion_2417" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2417_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (163, 11), end pos: (163, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -160,7 +160,7 @@ pdf: PdfSource, position: str | None = None, ) -&gt; bool: - if not HAS_PYMUPDF: + if HAS_PYMUPDF: return False try: b = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.................s..s..s.................. [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 39 passed, 3 skipped, 23 warnings in 20.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2418"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2418_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2418_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2418_1"><button class="btn btn-outline-success"><span class="job_id">2418 : Job ID 31cb2932deb5433eabd09eeccd0a3a68</span></button></div></a><div aria-labelledby="job_list___sub_heading_2418_1" data-parent="#job_list___sub_accordion_2418" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2418_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=178" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (178, 11), end pos: (178, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -175,7 +175,7 @@ return True def read_secret(self, pdf: PdfSource, key: str) -&gt; str: - if not HAS_PYMUPDF: + if HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F4524D7CE0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F452413380&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2333/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F452413380&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2333/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:179: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 22.17s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2419"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2419_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2419_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2419_1"><button class="btn btn-outline-success"><span class="job_id">2419 : Job ID 9a89f93ba0124c9e8a7069aa96bf6ed8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2419_1" data-parent="#job_list___sub_accordion_2419" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2419_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=180" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (180, 11), end pos: (180, 14)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -177,7 +177,7 @@ def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not key or not isinstance(key, str): + if key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000283C1A4BE00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000283C097D220&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-417/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000283C097D220&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-417/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:181: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2420"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2420_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2420_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2420_1"><button class="btn btn-outline-success"><span class="job_id">2420 : Job ID 09f2a52cbd514ce1971eeab135b5f5ae</span></button></div></a><div aria-labelledby="job_list___sub_heading_2420_1" data-parent="#job_list___sub_accordion_2420" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2420_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=180" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (180, 22), end pos: (180, 25)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -177,7 +177,7 @@ def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not key or not isinstance(key, str): + if not key or isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000263D23B7EC0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263D12DD1F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1332/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000263D12DD1F0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1332/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:181: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2421"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2421_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2421_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2421_1"><button class="btn btn-outline-success"><span class="job_id">2421 : Job ID a66d2a6bcd7a45ada80c562661a82d01</span></button></div></a><div aria-labelledby="job_list___sub_heading_2421_1" data-parent="#job_list___sub_accordion_2421" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2421_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=219" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (219, 15), end pos: (219, 18)</button></a></pre><pre>operator: core/ReplaceUnaryOperator_Delete_Not, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -216,7 +216,7 @@ raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure - if not (isinstance(payload, dict) and payload.get("secret")): + if (isinstance(payload, dict) and payload.get("secret")): raise SecretNotFoundError("Decrypted payload missing secret field") # Tamper check: recompute each hashed object</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001D3050E7F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001D305023410&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1382/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001D305023410&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1382/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &lt;= 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count) aes = AESGCM(key_bytes) try: pt = aes.decrypt(nonce, ct, None) except Exception as exc: raise InvalidKeyError( "Failed to authenticate watermark (key?)" ) from exc try: payload = json.loads(pt.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure if (isinstance(payload, dict) and payload.get("secret")): &gt; raise SecretNotFoundError("Decrypted payload missing secret field") E watermarking_method.SecretNotFoundError: Decrypted payload missing secret field signed_annotation_watermark.py:220: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.24s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2422"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2422_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2422_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2422_1"><button class="btn btn-outline-success"><span class="job_id">2422 : Job ID 1d2eefb4707440769cedf086c406590f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2422_1" data-parent="#job_list___sub_accordion_2422" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2422_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=80" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (80, 11), end pos: (80, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -77,7 +77,7 @@ intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002E3FAC37920&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002E3F9B693D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002E3F9B693D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:81: WatermarkingError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002E3FAC37E90&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002E3F9B693D0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1288/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002E3F9B693D0&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:81: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2423"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2423_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2423_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2423_1"><button class="btn btn-outline-success"><span class="job_id">2423 : Job ID 075d08dd12114019af27670faee6d95a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2423_1" data-parent="#job_list___sub_accordion_2423" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2423_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (82, 11), end pos: (82, 52)</button></a></pre><pre>operator: core/AddNot, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -79,7 +79,7 @@ ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not secret or not isinstance(secret, str): + if not not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF........F..F.................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143019401671Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T143020230763Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F8BEAAB590&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F8BE9B8680&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F8BE9B8680&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not not secret or not isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F8BEAABB00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F8BE9B8680&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-808/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F8BE9B8680&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not not secret or not isinstance(secret, str): &gt; raise ValueError("Secret must be a non-empty string") E ValueError: Secret must be a non-empty string signed_annotation_watermark.py:83: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 10 failed, 32 passed, 23 warnings in 20.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2424"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2424_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2424_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2424_1"><button class="btn btn-outline-success"><span class="job_id">2424 : Job ID 2d4faf2156104ce5b2fada4948f3d94f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2424_1" data-parent="#job_list___sub_accordion_2424" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2424_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (84, 11), end pos: (84, 46)</button></a></pre><pre>operator: core/AddNot, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -81,7 +81,7 @@ raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") - if not key or not isinstance(key, str): + if not not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019BDF3DB7D0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019BDF313440&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019BDF313440&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not not key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019BDF3DBD40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019BDF313440&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-852/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019BDF313440&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not not key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:85: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2425"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2425_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2425_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2425_1"><button class="btn btn-outline-success"><span class="job_id">2425 : Job ID 491d2dbccfe4460f9747f4c0febf6be3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2425_1" data-parent="#job_list___sub_accordion_2425" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2425_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 15), end pos: (99, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if not doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..................... [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000198FFB277A0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000198FFA635C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) assert isinstance(out_bytes, bytes | bytearray), ( # nosec B101 f"{method_name}: add_watermark must return bytes" ) &gt; assert len(out_bytes) &gt;= len(original), ( # nosec B101 f"{method_name}: watermarked bytes should not be smaller than input" ) E AssertionError: signed-annots: watermarked bytes should not be smaller than input E assert 2186 &gt;= 38471 E + where 2186 = len(b'%PDF-1.7\n%\xc2\xb5\xc2\xb6\n\n1 0 obj\n&lt;&lt;/Type/Catalog/Pages 2 0 R/Names&lt;&lt;/EmbeddedFiles&lt;&lt;/Names[(WM-TATOU-SIGNED-v...Size 9/Root 1 0 R/ID[&lt;50C2BA5253C3B3C28771C3B2C3B4376A&gt;&lt;FB526BCC94500E0D63FC91A5FD500D06&gt;]&gt;&gt;\nstartxref\n1871\n%%EOF\n') E + and 38471 = len(b'%PDF-1.5\n%\xc3\xa4\xc3\xbc\xc3\xb6\xc3\x9f\n2 0 obj\n&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;\nstream\nx\x9c\xadZK\x8f\...&gt;\n&lt;131B47C29D42EE0998F8FBFA411127C3&gt; ]\n/DocChecksum /EC879B7D25D058FE1A4352DCEF098D78\n&gt;&gt;\nstartxref\n37827\n%%EOF\n') ..\test\test_watermarking_all_methods.py:97: AssertionError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] 1 failed, 41 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2426"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2426_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2426_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2426_1"><button class="btn btn-outline-danger"><span class="job_id">2426 : Job ID e93a586bccb54a4080f91b56d774d0bb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2426_1" data-parent="#job_list___sub_accordion_2426" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2426_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=132" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (132, 19), end pos: (135, 17)</button></a></pre><pre>operator: core/AddNot, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -129,7 +129,7 @@ } manifest_bytes = json.dumps(manifest, separators=(",", ":")).encode("utf-8") try: - if ( + if not ( hasattr(doc, "_embfile_names") and self._EMBED_NAME in doc._embfile_names() ):</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.72s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2427"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2427_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2427_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2427_1"><button class="btn btn-outline-success"><span class="job_id">2427 : Job ID 78f083694af841e695c3ce839403a9fe</span></button></div></a><div aria-labelledby="job_list___sub_heading_2427_1" data-parent="#job_list___sub_accordion_2427" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2427_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=140" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (140, 19), end pos: (140, 47)</button></a></pre><pre>operator: core/AddNot, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -137,7 +137,7 @@ except Exception as exc: logger.debug("Cleanup of existing embedded file failed: %s", exc) try: - if hasattr(doc, "_embfile_add"): + if not hasattr(doc, "_embfile_add"): doc.embfile_add( self._EMBED_NAME, manifest_bytes,</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF...........F.................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233850449854Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T233851337267Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000214AFFB7DA0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000214AFEF32F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2296/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000214AFEF32F0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2296/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 11 failed, 31 passed, 23 warnings in 20.54s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2428"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2428_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2428_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2428_1"><button class="btn btn-outline-danger"><span class="job_id">2428 : Job ID 82bcd2754a554848b9288e27acd6d812</span></button></div></a><div aria-labelledby="job_list___sub_heading_2428_1" data-parent="#job_list___sub_accordion_2428" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2428_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=163" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (163, 11), end pos: (163, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -160,7 +160,7 @@ pdf: PdfSource, position: str | None = None, ) -&gt; bool: - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: return False try: b = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.................s..s..s.................. [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 39 passed, 3 skipped, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2429"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2429_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2429_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2429_1"><button class="btn btn-outline-success"><span class="job_id">2429 : Job ID fc43dd1cd54d46d08e380e10a15fa986</span></button></div></a><div aria-labelledby="job_list___sub_heading_2429_1" data-parent="#job_list___sub_accordion_2429" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2429_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=178" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (178, 11), end pos: (178, 26)</button></a></pre><pre>operator: core/AddNot, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -175,7 +175,7 @@ return True def read_secret(self, pdf: PdfSource, key: str) -&gt; str: - if not HAS_PYMUPDF: + if not not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000002A137187DA0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002A1370C34A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1574/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000002A1370C34A0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1574/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not not HAS_PYMUPDF: &gt; raise WatermarkingError("PyMuPDF is required for this watermark method") E watermarking_method.WatermarkingError: PyMuPDF is required for this watermark method signed_annotation_watermark.py:179: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.30s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2430"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2430_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2430_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2430_1"><button class="btn btn-outline-success"><span class="job_id">2430 : Job ID 4bf4297682864368b761de6a007320b4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2430_1" data-parent="#job_list___sub_accordion_2430" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2430_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=180" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (180, 11), end pos: (180, 46)</button></a></pre><pre>operator: core/AddNot, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -177,7 +177,7 @@ def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not key or not isinstance(key, str): + if not not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000185E0C07E00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000185E0B435C0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2001/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000185E0B435C0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2001/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not not key or not isinstance(key, str): &gt; raise ValueError("Key must be a non-empty string") E ValueError: Key must be a non-empty string signed_annotation_watermark.py:181: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2431"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2431_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2431_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2431_1"><button class="btn btn-outline-success"><span class="job_id">2431 : Job ID f53af785c6ca433e97037edbf29d69ba</span></button></div></a><div aria-labelledby="job_list___sub_heading_2431_1" data-parent="#job_list___sub_accordion_2431" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2431_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=187" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (187, 15), end pos: (187, 37)</button></a></pre><pre>operator: core/AddNot, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -184,7 +184,7 @@ doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) - if manifest_bytes is None: + if not manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001B3DDCEBCE0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001B3DDC23230&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2369/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001B3DDC23230&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2369/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if not manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.49s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2432"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2432_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2432_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2432_1"><button class="btn btn-outline-success"><span class="job_id">2432 : Job ID 20c3624bfc4c4caaaa4a91f2c78e795d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2432_1" data-parent="#job_list___sub_accordion_2432" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2432_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 15), end pos: (201, 54)</button></a></pre><pre>operator: core/AddNot, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if not iter_count &lt;= 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001F1795CBA40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F17894F680&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1330/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001F17894F680&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1330/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if not iter_count &lt;= 0 or iter_count &gt; 300_000: &gt; raise WatermarkingError("Unreasonable PBKDF2 iteration count") E watermarking_method.WatermarkingError: Unreasonable PBKDF2 iteration count signed_annotation_watermark.py:202: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2433"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2433_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2433_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2433_1"><button class="btn btn-outline-success"><span class="job_id">2433 : Job ID 70ae9738bacd46beb8e88062b213f1e2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2433_1" data-parent="#job_list___sub_accordion_2433" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2433_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=219" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (219, 15), end pos: (219, 72)</button></a></pre><pre>operator: core/AddNot, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -216,7 +216,7 @@ raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure - if not (isinstance(payload, dict) and payload.get("secret")): + if not not (isinstance(payload, dict) and payload.get("secret")): raise SecretNotFoundError("Decrypted payload missing secret field") # Tamper check: recompute each hashed object</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026F39CABA10&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000026F39BE2ED0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-379/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000026F39BE2ED0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-379/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: raise SecretNotFoundError("Signed annotation watermark not found") try: manifest = json.loads(manifest_bytes.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"]) nonce = base64.b64decode(manifest["nonce"]) ct = base64.b64decode(manifest["ct"]) iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation if iter_count &lt;= 0 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count) aes = AESGCM(key_bytes) try: pt = aes.decrypt(nonce, ct, None) except Exception as exc: raise InvalidKeyError( "Failed to authenticate watermark (key?)" ) from exc try: payload = json.loads(pt.decode("utf-8")) except Exception as exc: raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure if not not (isinstance(payload, dict) and payload.get("secret")): &gt; raise SecretNotFoundError("Decrypted payload missing secret field") E watermarking_method.SecretNotFoundError: Decrypted payload missing secret field signed_annotation_watermark.py:220: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.18s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2434"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2434_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2434_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2434_1"><button class="btn btn-outline-danger"><span class="job_id">2434 : Job ID 4a8c7cb95a7d454dbfbe25ef8e579ef3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2434_1" data-parent="#job_list___sub_accordion_2434" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2434_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=251" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (251, 15), end pos: (251, 49)</button></a></pre><pre>operator: core/AddNot, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -248,7 +248,7 @@ except Exception: return out for xref in range(1, xref_len): - if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: + if not len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.26s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2435"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2435_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2435_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2435_1"><button class="btn btn-outline-danger"><span class="job_id">2435 : Job ID cdd1a4df3a96433bba57bdb94e2382cc</span></button></div></a><div aria-labelledby="job_list___sub_heading_2435_1" data-parent="#job_list___sub_accordion_2435" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2435_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=261" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (261, 15), end pos: (261, 61)</button></a></pre><pre>operator: core/AddNot, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -258,7 +258,7 @@ ) continue lower = obj_str.lower() - if "/type /catalog" in lower or "/names" in lower: + if not "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.76s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2436"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2436_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2436_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2436_1"><button class="btn btn-outline-success"><span class="job_id">2436 : Job ID 48eebddbcaf34262ab0aae10fb579f2c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2436_1" data-parent="#job_list___sub_accordion_2436" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2436_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 15), end pos: (264, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if not len(b.strip()) &lt; 8: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135257541778Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T135258601878Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 21.62s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2437"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2437_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2437_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2437_1"><button class="btn btn-outline-success"><span class="job_id">2437 : Job ID 01b9698934fe4ef3a21aa641487e57d3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2437_1" data-parent="#job_list___sub_accordion_2437" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2437_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 15), end pos: (273, 34)</button></a></pre><pre>operator: core/AddNot, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if not doc.page_count == 0: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175153132941Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175154014488Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2438"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2438_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2438_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2438_1"><button class="btn btn-outline-danger"><span class="job_id">2438 : Job ID 0cf570fa837f486dae600ad57456ddc5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2438_1" data-parent="#job_list___sub_accordion_2438" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2438_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=288" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (288, 19), end pos: (288, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -285,7 +285,7 @@ logger.debug("Setting annotation flags failed: %s", exc) try: # Ensure it is not auto-open - if hasattr(annot, "set_open"): + if not hasattr(annot, "set_open"): annot.set_open(False) except Exception as exc: logger.debug("Setting annotation open state failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2439"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2439_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2439_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2439_1"><button class="btn btn-outline-success"><span class="job_id">2439 : Job ID 98da496578b8472cb0b453d14d1eb9b2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2439_1" data-parent="#job_list___sub_accordion_2439" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2439_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=315" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (315, 15), end pos: (315, 45)</button></a></pre><pre>operator: core/AddNot, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -312,7 +312,7 @@ # Primary: embedded file logger = logging.getLogger(__name__) try: - if hasattr(doc, "_embfile_names"): + if not hasattr(doc, "_embfile_names"): names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001BC65B2BD10&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BC65A63200&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2473/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001BC65A63200&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2473/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2440"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2440_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2440_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2440_1"><button class="btn btn-outline-success"><span class="job_id">2440 : Job ID 9fc0b1ad58e8406bb96c45aed9f6dce8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2440_1" data-parent="#job_list___sub_accordion_2440" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2440_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=317" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (317, 19), end pos: (317, 44)</button></a></pre><pre>operator: core/AddNot, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -314,7 +314,7 @@ try: if hasattr(doc, "_embfile_names"): names = doc.embfile_names() - if self._EMBED_NAME in names: + if not self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) if isinstance(file_bytes, bytes | bytearray): return bytes(file_bytes)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000015A8D687D40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000015A8D5C35F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-973/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000015A8D5C35F0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-973/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.19s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2441"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2441_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2441_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2441_1"><button class="btn btn-outline-success"><span class="job_id">2441 : Job ID f7de0c3b90cc401cb092e99b29a77b67</span></button></div></a><div aria-labelledby="job_list___sub_heading_2441_1" data-parent="#job_list___sub_accordion_2441" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2441_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=319" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (319, 23), end pos: (319, 64)</button></a></pre><pre>operator: core/AddNot, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -316,7 +316,7 @@ names = doc.embfile_names() if self._EMBED_NAME in names: file_bytes = doc.embfile_get(self._EMBED_NAME) - if isinstance(file_bytes, bytes | bytearray): + if not isinstance(file_bytes, bytes | bytearray): return bytes(file_bytes) except Exception as exc: logger.debug("Failed to extract embedded manifest: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000207B0B0BCE0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000207B0A430E0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-205/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000207B0A430E0&gt; pdf = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-205/test_read_secret_roundtrip_sig0/signed-annots_watermarked.pdf') key = 'unit-test-key' def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf) doc = pymupdf.open(stream=data, filetype="pdf") try: manifest_bytes = self._extract_manifest(doc) if manifest_bytes is None: &gt; raise SecretNotFoundError("Signed annotation watermark not found") E watermarking_method.SecretNotFoundError: Signed annotation watermark not found signed_annotation_watermark.py:188: SecretNotFoundError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.16s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2442"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2442_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2442_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2442_1"><button class="btn btn-outline-danger"><span class="job_id">2442 : Job ID 5d93aa4067fb4a909925293235020ffa</span></button></div></a><div aria-labelledby="job_list___sub_heading_2442_1" data-parent="#job_list___sub_accordion_2442" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2442_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=339" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (339, 15), end pos: (339, 61)</button></a></pre><pre>operator: core/AddNot, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -336,7 +336,7 @@ "Referenced object missing (tampered)" ) from None lower = obj_str.lower() - if "/type /catalog" in lower or "/names" in lower: + if not "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2443"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2443_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2443_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2443_1"><button class="btn btn-outline-success"><span class="job_id">2443 : Job ID 7550c08ba2aa4bb0a04532979346c33c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2443_1" data-parent="#job_list___sub_accordion_2443" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2443_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=343" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (343, 15), end pos: (343, 33)</button></a></pre><pre>operator: core/AddNot, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -340,7 +340,7 @@ continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) - if actual != expected: + if not actual != expected: raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000020BBC09BBF0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000020BBBFD3260&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2338/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000020BBBFD3260&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if not actual != expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.88s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2444"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2444_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2444_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2444_1"><button class="btn btn-outline-danger"><span class="job_id">2444 : Job ID b7bc9faa00034908914701ce9d26504a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2444_1" data-parent="#job_list___sub_accordion_2444" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2444_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=39" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (39, 18), end pos: (39, 22)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -36,7 +36,7 @@ try: # PyMuPDF is required for all operations of this method import pymupdf - HAS_PYMUPDF = True + HAS_PYMUPDF = False except Exception: HAS_PYMUPDF = False </pre></div><div class="alert alert-secondary"><pre class="diff">.................s..s..s.................. [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 39 passed, 3 skipped, 23 warnings in 20.64s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2445"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2445_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2445_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2445_1"><button class="btn btn-outline-danger"><span class="job_id">2445 : Job ID ee7bb1c273d141c7baabb64533c8ef60</span></button></div></a><div aria-labelledby="job_list___sub_heading_2445_1" data-parent="#job_list___sub_accordion_2445" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2445_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=175" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (175, 15), end pos: (175, 19)</button></a></pre><pre>operator: core/ReplaceTrueWithFalse, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -172,7 +172,7 @@ doc.close() except Exception as exc: logging.getLogger(__name__).debug("Closing document failed: %s", exc) - return True + return False def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF:</pre></div><div class="alert alert-secondary"><pre class="diff">.................s..s..s.................. [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 39 passed, 3 skipped, 23 warnings in 20.75s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2446"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2446_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2446_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2446_1"><button class="btn btn-outline-danger"><span class="job_id">2446 : Job ID 128c56f023354f5dab1c261a7d98784b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2446_1" data-parent="#job_list___sub_accordion_2446" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2446_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=41" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (41, 18), end pos: (41, 23)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -38,7 +38,7 @@ HAS_PYMUPDF = True except Exception: - HAS_PYMUPDF = False + HAS_PYMUPDF = True @dataclass</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2447"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2447_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2447_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2447_1"><button class="btn btn-outline-danger"><span class="job_id">2447 : Job ID 4b856ab9a7c6441a83ec41cc889b866c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2447_1" data-parent="#job_list___sub_accordion_2447" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2447_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=164" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (164, 19), end pos: (164, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -161,7 +161,7 @@ position: str | None = None, ) -&gt; bool: if not HAS_PYMUPDF: - return False + return True try: b = load_pdf_bytes(pdf) doc = pymupdf.open(stream=b, filetype="pdf")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.10s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2448"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2448_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2448_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2448_1"><button class="btn btn-outline-danger"><span class="job_id">2448 : Job ID 7812171c484940b5a8ba5413ba3b690c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2448_1" data-parent="#job_list___sub_accordion_2448" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2448_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=169" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (169, 19), end pos: (169, 24)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -166,7 +166,7 @@ b = load_pdf_bytes(pdf) doc = pymupdf.open(stream=b, filetype="pdf") except Exception: - return False + return True finally: try: doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.69s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2449"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2449_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2449_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2449_1"><button class="btn btn-outline-success"><span class="job_id">2449 : Job ID 0fc1615127e743c7b0677304a976df33</span></button></div></a><div aria-labelledby="job_list___sub_heading_2449_1" data-parent="#job_list___sub_accordion_2449" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2449_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=254" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (254, 59), end pos: (254, 64)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -251,7 +251,7 @@ if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: - obj_str = doc.xref_object(xref, compressed=False) or "" + obj_str = doc.xref_object(xref, compressed=True) or "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001E760B2BC50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E760A62FC0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2295/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001E760A62FC0&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '20ebddee1a94c61a543495bddef74699f5a0d978ee2b5954f10660f2b7c05df0', 'xref': 1}, {'sha256': '3800062d1147d8...7461bc8e4', 'xref': 7}, {'sha256': '519035e35f97b5b1fc22dc454ae544357ffcbb63d06bffde4f311b9a8f8238d5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual != expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2450"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2450_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2450_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2450_1"><button class="btn btn-outline-danger"><span class="job_id">2450 : Job ID a64eb0b68f154423b0380752f392c0f1</span></button></div></a><div aria-labelledby="job_list___sub_heading_2450_1" data-parent="#job_list___sub_accordion_2450" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2450_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=289" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (289, 35), end pos: (289, 40)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -286,7 +286,7 @@ try: # Ensure it is not auto-open if hasattr(annot, "set_open"): - annot.set_open(False) + annot.set_open(True) except Exception as exc: logger.debug("Setting annotation open state failed: %s", exc) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.85s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2451"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2451_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2451_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2451_1"><button class="btn btn-outline-success"><span class="job_id">2451 : Job ID 9badf82635824c02bcd706e7cf1c8a4c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2451_1" data-parent="#job_list___sub_accordion_2451" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2451_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=333" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (333, 59), end pos: (333, 64)</button></a></pre><pre>operator: core/ReplaceFalseWithTrue, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -330,7 +330,7 @@ except Exception: raise WatermarkingError("Malformed object hash entry") from None try: - obj_str = doc.xref_object(xref, compressed=False) or "" + obj_str = doc.xref_object(xref, compressed=True) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000158FCCFBD40&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000158FCC332F0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-660/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000158FCC332F0&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=True) or "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual != expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2452"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2452_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2452_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2452_1"><button class="btn btn-outline-danger"><span class="job_id">2452 : Job ID 25bfe3eba6734b25be8c4105fafccc36</span></button></div></a><div aria-labelledby="job_list___sub_heading_2452_1" data-parent="#job_list___sub_accordion_2452" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2452_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=134" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (134, 20), end pos: (134, 23)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -131,7 +131,7 @@ try: if ( hasattr(doc, "_embfile_names") - and self._EMBED_NAME in doc._embfile_names() + or self._EMBED_NAME in doc._embfile_names() ): doc._embfile_del(self._EMBED_NAME) except Exception as exc:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2453"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2453_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2453_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2453_1"><button class="btn btn-outline-danger"><span class="job_id">2453 : Job ID 733be042d2a040e19f0ca3bec6fabe57</span></button></div></a><div aria-labelledby="job_list___sub_heading_2453_1" data-parent="#job_list___sub_accordion_2453" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2453_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=219" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (219, 46), end pos: (219, 49)</button></a></pre><pre>operator: core/ReplaceAndWithOr, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -216,7 +216,7 @@ raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure - if not (isinstance(payload, dict) and payload.get("secret")): + if not (isinstance(payload, dict) or payload.get("secret")): raise SecretNotFoundError("Decrypted payload missing secret field") # Tamper check: recompute each hashed object</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2454"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2454_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2454_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2454_1"><button class="btn btn-outline-danger"><span class="job_id">2454 : Job ID 7a9dbcc27c5c411ba8ffb159687e1c76</span></button></div></a><div aria-labelledby="job_list___sub_heading_2454_1" data-parent="#job_list___sub_accordion_2454" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2454_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=82" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (82, 22), end pos: (82, 24)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -79,7 +79,7 @@ ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not secret or not isinstance(secret, str): + if not secret and not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string")</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2455"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2455_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2455_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2455_1"><button class="btn btn-outline-danger"><span class="job_id">2455 : Job ID 85610611276e48c8aaebb441ce8fc668</span></button></div></a><div aria-labelledby="job_list___sub_heading_2455_1" data-parent="#job_list___sub_accordion_2455" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2455_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=84" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (84, 19), end pos: (84, 21)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -81,7 +81,7 @@ raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") - if not key or not isinstance(key, str): + if not key and not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.78s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2456"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2456_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2456_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2456_1"><button class="btn btn-outline-danger"><span class="job_id">2456 : Job ID 242f13f6e9e34baaae7f3c03cf7753d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2456_1" data-parent="#job_list___sub_accordion_2456" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2456_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=180" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (180, 19), end pos: (180, 21)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -177,7 +177,7 @@ def read_secret(self, pdf: PdfSource, key: str) -&gt; str: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") - if not key or not isinstance(key, str): + if not key and not isinstance(key, str): raise ValueError("Key must be a non-empty string") data = load_pdf_bytes(pdf)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2457"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2457_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2457_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2457_1"><button class="btn btn-outline-danger"><span class="job_id">2457 : Job ID 47d82fafdaae4dd7afecf6ea98c125c5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2457_1" data-parent="#job_list___sub_accordion_2457" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2457_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 31), end pos: (201, 33)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 and iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2458"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2458_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2458_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2458_1"><button class="btn btn-outline-success"><span class="job_id">2458 : Job ID 8145e9102fb14027a4a35b79aea000f4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2458_1" data-parent="#job_list___sub_accordion_2458" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2458_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=239" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (239, 37), end pos: (239, 39)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -236,7 +236,7 @@ algorithm=hashes.SHA256(), length=32, salt=salt, - iterations=iter_override or self._PBKDF2_ITER, + iterations=iter_override and self._PBKDF2_ITER, ) return kdf.derive(password.encode("utf-8")) </pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000025D4AEB7890&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000025D49ED01A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:111: in add_watermark derived_key = self._derive_key(key, salt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ signed_annotation_watermark.py:241: in _derive_key return kdf.derive(password.encode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x0000025D4B2E4530&gt; key_material = b'unit-test-key' def derive(self, key_material: utils.Buffer) -&gt; bytes: if self._used: raise AlreadyFinalized("PBKDF2 instances can only be used once.") self._used = True &gt; return rust_openssl.kdf.derive_pbkdf2_hmac( key_material, self._algorithm, self._salt, self._iterations, self._length, ) E TypeError: argument 'iterations': 'NoneType' object cannot be interpreted as an integer C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\hazmat\primitives\kdf\pbkdf2.py:51: TypeError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000025D4AEB7E00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000025D49ED01A0&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1335/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:111: in add_watermark derived_key = self._derive_key(key, salt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ signed_annotation_watermark.py:241: in _derive_key return kdf.derive(password.encode("utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x0000025D4B363860&gt; key_material = b'unit-test-key' def derive(self, key_material: utils.Buffer) -&gt; bytes: if self._used: raise AlreadyFinalized("PBKDF2 instances can only be used once.") self._used = True &gt; return rust_openssl.kdf.derive_pbkdf2_hmac( key_material, self._algorithm, self._salt, self._iterations, self._length, ) E TypeError: argument 'iterations': 'NoneType' object cannot be interpreted as an integer C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\cryptography\hazmat\primitives\kdf\pbkdf2.py:51: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2459"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2459_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2459_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2459_1"><button class="btn btn-outline-danger"><span class="job_id">2459 : Job ID 6eb579b86e654db9a7a9849cf73aaf1d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2459_1" data-parent="#job_list___sub_accordion_2459" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2459_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=254" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (254, 66), end pos: (254, 68)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -251,7 +251,7 @@ if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: - obj_str = doc.xref_object(xref, compressed=False) or "" + obj_str = doc.xref_object(xref, compressed=False) and "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2460"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2460_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2460_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2460_1"><button class="btn btn-outline-danger"><span class="job_id">2460 : Job ID 5533b71aa1234367a1f2d3be2c96ac83</span></button></div></a><div aria-labelledby="job_list___sub_heading_2460_1" data-parent="#job_list___sub_accordion_2460" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2460_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=261" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (261, 41), end pos: (261, 43)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -258,7 +258,7 @@ ) continue lower = obj_str.lower() - if "/type /catalog" in lower or "/names" in lower: + if "/type /catalog" in lower and "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2461"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2461_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2461_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2461_1"><button class="btn btn-outline-success"><span class="job_id">2461 : Job ID babdab4e993b4f0b8bb80c532b8ba608</span></button></div></a><div aria-labelledby="job_list___sub_heading_2461_1" data-parent="#job_list___sub_accordion_2461" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2461_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=333" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (333, 66), end pos: (333, 68)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -330,7 +330,7 @@ except Exception: raise WatermarkingError("Malformed object hash entry") from None try: - obj_str = doc.xref_object(xref, compressed=False) or "" + obj_str = doc.xref_object(xref, compressed=False) and "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)"</pre></div><div class="alert alert-secondary"><pre class="diff">.......................F.................. [100%] ================================== FAILURES =================================== ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001CF35D17E60&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001CF31E5B620&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1974/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) &gt; extracted = wm_impl.read_secret(out_pdf, key=key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_watermarking_all_methods.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:223: in read_secret self._verify_object_hashes(doc, payload.get("objs", [])) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001CF31E5B620&gt; doc = closed Document('None', &lt;memory, doc# 23&gt;) entries = [{'sha256': '3b4bc584aeb83b71e5ea5395f7304e1176dfdcb35cbcd6080ea23be9cf05e7b2', 'xref': 1}, {'sha256': '20f81d356c4e94...8ef5d4418', 'xref': 7}, {'sha256': '3beab1e106528ed004d6d2f548364a9c3381cf379ebc552f8cb18f7a3ecbc5c5', 'xref': 8}, ...] def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: for e in entries: try: xref = int(e.get("xref")) expected = str(e.get("sha256")) except Exception: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) and "" except Exception: raise WatermarkingError( "Referenced object missing (tampered)" ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual != expected: &gt; raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) E watermarking_method.WatermarkingError: PDF appears tampered: object hash mismatch (xref 1) signed_annotation_watermark.py:344: WatermarkingError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 1 failed, 41 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2462"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2462_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2462_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2462_1"><button class="btn btn-outline-danger"><span class="job_id">2462 : Job ID fb9bf44ed028471eaf1f6574c3d001fb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2462_1" data-parent="#job_list___sub_accordion_2462" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2462_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=339" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (339, 41), end pos: (339, 43)</button></a></pre><pre>operator: core/ReplaceOrWithAnd, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -336,7 +336,7 @@ "Referenced object missing (tampered)" ) from None lower = obj_str.lower() - if "/type /catalog" in lower or "/names" in lower: + if "/type /catalog" in lower and "/names" in lower: continue b = obj_str.encode("latin-1", "replace") actual = self._sha256(b)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.63s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2463"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2463_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2463_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2463_1"><button class="btn btn-outline-danger"><span class="job_id">2463 : Job ID 2aac3963cf9e4e8f932798ed17e78360</span></button></div></a><div aria-labelledby="job_list___sub_heading_2463_1" data-parent="#job_list___sub_accordion_2463" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2463_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=252" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (252, 16), end pos: (252, 21)</button></a></pre><pre>operator: core/ReplaceBreakWithContinue, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -249,7 +249,7 @@ return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: - break + continue try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception as exc:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.06s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2464"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2464_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2464_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2464_1"><button class="btn btn-outline-danger"><span class="job_id">2464 : Job ID ff18026666a14c60ab43aaa5fec5a29b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2464_1" data-parent="#job_list___sub_accordion_2464" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2464_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=259" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (259, 16), end pos: (259, 24)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -256,7 +256,7 @@ logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc ) - continue + break lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2465"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2465_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2465_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2465_1"><button class="btn btn-outline-danger"><span class="job_id">2465 : Job ID 4f0dff479bac4cc890a23be2601e1474</span></button></div></a><div aria-labelledby="job_list___sub_heading_2465_1" data-parent="#job_list___sub_accordion_2465" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2465_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=262" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (262, 16), end pos: (262, 24)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -259,7 +259,7 @@ continue lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: - continue + break b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: continue</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2466"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2466_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2466_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2466_1"><button class="btn btn-outline-danger"><span class="job_id">2466 : Job ID f309da4972a64e1198e1f9081354076a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2466_1" data-parent="#job_list___sub_accordion_2466" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2466_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=265" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (265, 16), end pos: (265, 24)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -262,7 +262,7 @@ continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: - continue + break sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256)) return out</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2467"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2467_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2467_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2467_1"><button class="btn btn-outline-danger"><span class="job_id">2467 : Job ID 4b02b786b2f74f67a93d1a314488a1d4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2467_1" data-parent="#job_list___sub_accordion_2467" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2467_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=340" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (340, 16), end pos: (340, 24)</button></a></pre><pre>operator: core/ReplaceContinueWithBreak, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -337,7 +337,7 @@ ) from None lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: - continue + break b = obj_str.encode("latin-1", "replace") actual = self._sha256(b) if actual != expected:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2468"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2468_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2468_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2468_1"><button class="btn btn-outline-danger"><span class="job_id">2468 : Job ID ad61f8463874493c96a341eb44705ed2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2468_1" data-parent="#job_list___sub_accordion_2468" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2468_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=40" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (40, 7), end pos: (40, 16)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -37,7 +37,7 @@ import pymupdf HAS_PYMUPDF = True -except Exception: +except CosmicRayTestingException: HAS_PYMUPDF = False </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2469"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2469_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2469_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2469_1"><button class="btn btn-outline-danger"><span class="job_id">2469 : Job ID 9be6bfe0d46e48d09fee6619dc892e9d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2469_1" data-parent="#job_list___sub_accordion_2469" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2469_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=94" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (94, 15), end pos: (94, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -91,7 +91,7 @@ doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") - except Exception as exc: # fallback: create new doc and append original as raw? + except CosmicRayTestingException as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.51s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2470"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2470_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2470_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2470_1"><button class="btn btn-outline-success"><span class="job_id">2470 : Job ID c8631b3e06834f3596abc5e7d048b30e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2470_1" data-parent="#job_list___sub_accordion_2470" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2470_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=137" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (137, 19), end pos: (137, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -134,7 +134,7 @@ and self._EMBED_NAME in doc._embfile_names() ): doc._embfile_del(self._EMBED_NAME) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Cleanup of existing embedded file failed: %s", exc) try: if hasattr(doc, "_embfile_add"):</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) manifest = { "v": self._VERSION, "alg": "AES-256-GCM-PBKDF2", "iter": self._PBKDF2_ITER, "salt": base64.b64encode(salt).decode("ascii"), "nonce": base64.b64encode(nonce).decode("ascii"), "ct": base64.b64encode(ciphertext).decode("ascii"), "id_hint": id_hint, } manifest_bytes = json.dumps(manifest, separators=(",", ":")).encode("utf-8") try: if ( hasattr(doc, "_embfile_names") &gt; and self._EMBED_NAME in doc._embfile_names() ^^^^^^^^^^^^^^^^^^^^ ): E TypeError: Document._embfile_names() missing 1 required positional argument: 'namelist' signed_annotation_watermark.py:134: TypeError During handling of the above exception, another exception occurred: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000189A40BB830&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) manifest = { "v": self._VERSION, "alg": "AES-256-GCM-PBKDF2", "iter": self._PBKDF2_ITER, "salt": base64.b64encode(salt).decode("ascii"), "nonce": base64.b64encode(nonce).decode("ascii"), "ct": base64.b64encode(ciphertext).decode("ascii"), "id_hint": id_hint, } manifest_bytes = json.dumps(manifest, separators=(",", ":")).encode("utf-8") try: if ( hasattr(doc, "_embfile_names") and self._EMBED_NAME in doc._embfile_names() ): doc._embfile_del(self._EMBED_NAME) &gt; except CosmicRayTestingException as exc: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined signed_annotation_watermark.py:137: NameError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) manifest = { "v": self._VERSION, "alg": "AES-256-GCM-PBKDF2", "iter": self._PBKDF2_ITER, "salt": base64.b64encode(salt).decode("ascii"), "nonce": base64.b64encode(nonce).decode("ascii"), "ct": base64.b64encode(ciphertext).decode("ascii"), "id_hint": id_hint, } manifest_bytes = json.dumps(manifest, separators=(",", ":")).encode("utf-8") try: if ( hasattr(doc, "_embfile_names") &gt; and self._EMBED_NAME in doc._embfile_names() ^^^^^^^^^^^^^^^^^^^^ ): E TypeError: Document._embfile_names() missing 1 required positional argument: 'namelist' signed_annotation_watermark.py:134: TypeError During handling of the above exception, another exception occurred: self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x00000189A40BBDA0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-1506/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000189A3FF3140&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) manifest = { "v": self._VERSION, "alg": "AES-256-GCM-PBKDF2", "iter": self._PBKDF2_ITER, "salt": base64.b64encode(salt).decode("ascii"), "nonce": base64.b64encode(nonce).decode("ascii"), "ct": base64.b64encode(ciphertext).decode("ascii"), "id_hint": id_hint, } manifest_bytes = json.dumps(manifest, separators=(",", ":")).encode("utf-8") try: if ( hasattr(doc, "_embfile_names") and self._EMBED_NAME in doc._embfile_names() ): doc._embfile_del(self._EMBED_NAME) &gt; except CosmicRayTestingException as exc: ^^^^^^^^^^^^^^^^^^^^^^^^^ E NameError: name 'CosmicRayTestingException' is not defined signed_annotation_watermark.py:137: NameError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2471"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2471_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2471_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2471_1"><button class="btn btn-outline-danger"><span class="job_id">2471 : Job ID 2e935837cfe64a17bbd26885b4a01be3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2471_1" data-parent="#job_list___sub_accordion_2471" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2471_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=147" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (147, 19), end pos: (147, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -144,7 +144,7 @@ filename=self._EMBED_NAME, desc="Tatou signed watermark manifest v1", ) - except Exception as exc: + except CosmicRayTestingException as exc: raise WatermarkingError( f"Failed to attach watermark embedded file: {exc}" ) from exc</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2472"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2472_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2472_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2472_1"><button class="btn btn-outline-danger"><span class="job_id">2472 : Job ID a4a8bf62068646b6a2b8d022d9d8850a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2472_1" data-parent="#job_list___sub_accordion_2472" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2472_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=155" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (155, 19), end pos: (155, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -152,7 +152,7 @@ finally: try: doc.close() - except Exception as exc: + except CosmicRayTestingException as exc: logging.getLogger(__name__).debug("Closing document failed: %s", exc) def is_watermark_applicable(</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2473"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2473_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2473_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2473_1"><button class="btn btn-outline-danger"><span class="job_id">2473 : Job ID a034281bd80740439e45defcf24065e0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2473_1" data-parent="#job_list___sub_accordion_2473" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2473_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=168" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (168, 15), end pos: (168, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -165,7 +165,7 @@ try: b = load_pdf_bytes(pdf) doc = pymupdf.open(stream=b, filetype="pdf") - except Exception: + except CosmicRayTestingException: return False finally: try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2474"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2474_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2474_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2474_1"><button class="btn btn-outline-danger"><span class="job_id">2474 : Job ID 6512babfd6d64519bb28d9bd70478db2</span></button></div></a><div aria-labelledby="job_list___sub_heading_2474_1" data-parent="#job_list___sub_accordion_2474" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2474_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=173" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (173, 19), end pos: (173, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -170,7 +170,7 @@ finally: try: doc.close() - except Exception as exc: + except CosmicRayTestingException as exc: logging.getLogger(__name__).debug("Closing document failed: %s", exc) return True </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2475"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2475_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2475_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2475_1"><button class="btn btn-outline-danger"><span class="job_id">2475 : Job ID 0322a74b80a641bda2d45d4c63ac5954</span></button></div></a><div aria-labelledby="job_list___sub_heading_2475_1" data-parent="#job_list___sub_accordion_2475" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2475_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=192" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (192, 19), end pos: (192, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -189,7 +189,7 @@ try: manifest = json.loads(manifest_bytes.decode("utf-8")) - except Exception as exc: + except CosmicRayTestingException as exc: raise SecretNotFoundError("Malformed watermark manifest") from exc salt = base64.b64decode(manifest["salt"])</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.34s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2476"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2476_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2476_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2476_1"><button class="btn btn-outline-danger"><span class="job_id">2476 : Job ID 082bcea488b3447bb87e1dec1c7be767</span></button></div></a><div aria-labelledby="job_list___sub_heading_2476_1" data-parent="#job_list___sub_accordion_2476" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2476_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=208" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (208, 19), end pos: (208, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -205,7 +205,7 @@ aes = AESGCM(key_bytes) try: pt = aes.decrypt(nonce, ct, None) - except Exception as exc: + except CosmicRayTestingException as exc: raise InvalidKeyError( "Failed to authenticate watermark (key?)" ) from exc</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2477"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2477_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2477_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2477_1"><button class="btn btn-outline-danger"><span class="job_id">2477 : Job ID c8ba66e113574363b2264a92901933c6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2477_1" data-parent="#job_list___sub_accordion_2477" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2477_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=215" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (215, 19), end pos: (215, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -212,7 +212,7 @@ try: payload = json.loads(pt.decode("utf-8")) - except Exception as exc: + except CosmicRayTestingException as exc: raise SecretNotFoundError("Corrupted decrypted payload") from exc # Validate structure</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.01s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2478"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2478_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2478_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2478_1"><button class="btn btn-outline-danger"><span class="job_id">2478 : Job ID 51ada08b72684fb0bf43a17e662a3117</span></button></div></a><div aria-labelledby="job_list___sub_heading_2478_1" data-parent="#job_list___sub_accordion_2478" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2478_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=248" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (248, 15), end pos: (248, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -245,7 +245,7 @@ out: list[_ObjectHash] = [] try: xref_len = doc.xref_length() - except Exception: + except CosmicRayTestingException: return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.14s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2479"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2479_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2479_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2479_1"><button class="btn btn-outline-danger"><span class="job_id">2479 : Job ID 6414c66e60c04766946a2a2de7b9fb69</span></button></div></a><div aria-labelledby="job_list___sub_heading_2479_1" data-parent="#job_list___sub_accordion_2479" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2479_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=255" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (255, 19), end pos: (255, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -252,7 +252,7 @@ break try: obj_str = doc.xref_object(xref, compressed=False) or "" - except Exception as exc: + except CosmicRayTestingException as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc )</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.95s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2480"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2480_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2480_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2480_1"><button class="btn btn-outline-danger"><span class="job_id">2480 : Job ID 40c0181a5855494f9a608d2db7392d89</span></button></div></a><div aria-labelledby="job_list___sub_heading_2480_1" data-parent="#job_list___sub_accordion_2480" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2480_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=284" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (284, 19), end pos: (284, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -281,7 +281,7 @@ # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) flags = 1 | 2 | 32 | 64 annot.set_flags(flags) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Setting annotation flags failed: %s", exc) try: # Ensure it is not auto-open</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2481"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2481_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2481_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2481_1"><button class="btn btn-outline-danger"><span class="job_id">2481 : Job ID 7dea2ff6c586495f855366acdbb7e43d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2481_1" data-parent="#job_list___sub_accordion_2481" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2481_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=290" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (290, 19), end pos: (290, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -287,7 +287,7 @@ # Ensure it is not auto-open if hasattr(annot, "set_open"): annot.set_open(False) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Setting annotation open state failed: %s", exc) try: annot.set_opacity(0)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2482"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2482_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2482_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2482_1"><button class="btn btn-outline-danger"><span class="job_id">2482 : Job ID d1c803862bd5448fb5948b64d9c4aff3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2482_1" data-parent="#job_list___sub_accordion_2482" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2482_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=294" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (294, 19), end pos: (294, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -291,7 +291,7 @@ logger.debug("Setting annotation open state failed: %s", exc) try: annot.set_opacity(0) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Setting annotation opacity failed: %s", exc) try: # Shrink rectangle to a tiny box</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2483"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2483_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2483_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2483_1"><button class="btn btn-outline-danger"><span class="job_id">2483 : Job ID a88d27ea63b349c3ac43f2305cb23e6b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2483_1" data-parent="#job_list___sub_accordion_2483" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2483_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=301" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (301, 19), end pos: (301, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -298,7 +298,7 @@ r = annot.rect tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) annot.set_rect(tiny) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Shrinking annotation rect failed: %s", exc) try: annot.update()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.05s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2484"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2484_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2484_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2484_1"><button class="btn btn-outline-danger"><span class="job_id">2484 : Job ID c5b5578e3a1f45a39c9044e5f13be5e5</span></button></div></a><div aria-labelledby="job_list___sub_heading_2484_1" data-parent="#job_list___sub_accordion_2484" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2484_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=305" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (305, 19), end pos: (305, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -302,7 +302,7 @@ logger.debug("Shrinking annotation rect failed: %s", exc) try: annot.update() - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Annotation update failed: %s", exc) except Exception as exc: logger.debug("Adding invisible annotation failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.04s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2485"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2485_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2485_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2485_1"><button class="btn btn-outline-danger"><span class="job_id">2485 : Job ID f7bf7d736d864f7595f2b20709cfbb79</span></button></div></a><div aria-labelledby="job_list___sub_heading_2485_1" data-parent="#job_list___sub_accordion_2485" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2485_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=307" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (307, 15), end pos: (307, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -304,7 +304,7 @@ annot.update() except Exception as exc: logger.debug("Annotation update failed: %s", exc) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Adding invisible annotation failed: %s", exc) return None </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2486"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2486_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2486_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2486_1"><button class="btn btn-outline-success"><span class="job_id">2486 : Job ID 397a058b4a19406da7b712cb1b1ec792</span></button></div></a><div aria-labelledby="job_list___sub_heading_2486_1" data-parent="#job_list___sub_accordion_2486" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2486_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=321" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (321, 15), end pos: (321, 24)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -318,7 +318,7 @@ file_bytes = doc.embfile_get(self._EMBED_NAME) if isinstance(file_bytes, bytes | bytearray): return bytes(file_bytes) - except Exception as exc: + except CosmicRayTestingException as exc: logger.debug("Failed to extract embedded manifest: %s", exc) return None </pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211405666011Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T211406520245Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.44s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2487"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2487_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2487_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2487_1"><button class="btn btn-outline-success"><span class="job_id">2487 : Job ID e9632b2213294957a007e6376e07d27b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2487_1" data-parent="#job_list___sub_accordion_2487" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2487_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=330" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (330, 19), end pos: (330, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -327,7 +327,7 @@ try: xref = int(e.get("xref")) expected = str(e.get("sha256")) - except Exception: + except CosmicRayTestingException: raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or ""</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235536986582Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T235537858406Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2488"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2488_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2488_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2488_1"><button class="btn btn-outline-danger"><span class="job_id">2488 : Job ID 51a4d37495f14f3ba7f06453741681d8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2488_1" data-parent="#job_list___sub_accordion_2488" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2488_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=334" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (334, 19), end pos: (334, 28)</button></a></pre><pre>operator: core/ExceptionReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -331,7 +331,7 @@ raise WatermarkingError("Malformed object hash entry") from None try: obj_str = doc.xref_object(xref, compressed=False) or "" - except Exception: + except CosmicRayTestingException: raise WatermarkingError( "Referenced object missing (tampered)" ) from None</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2489"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2489_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2489_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2489_1"><button class="btn btn-outline-danger"><span class="job_id">2489 : Job ID 84ab20082df04abfabf6d19b53b04e3f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2489_1" data-parent="#job_list___sub_accordion_2489" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2489_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=57" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (57, 27), end pos: (57, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -54,7 +54,7 @@ # Constants _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" - _VERSION: Final[int] = 1 + _VERSION: Final[int] = 2 _PBKDF2_ITER: Final[int] = 120_000 _SALT_LEN: Final[int] = 16 _OBJ_SAMPLE_LIMIT: Final[int] = 12</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.32s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2490"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2490_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2490_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2490_1"><button class="btn btn-outline-danger"><span class="job_id">2490 : Job ID 8e3726efb460463389e3e89651705350</span></button></div></a><div aria-labelledby="job_list___sub_heading_2490_1" data-parent="#job_list___sub_accordion_2490" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2490_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=57" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (57, 27), end pos: (57, 28)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -54,7 +54,7 @@ # Constants _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" - _VERSION: Final[int] = 1 + _VERSION: Final[int] = 0 _PBKDF2_ITER: Final[int] = 120_000 _SALT_LEN: Final[int] = 16 _OBJ_SAMPLE_LIMIT: Final[int] = 12</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2491"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2491_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2491_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2491_1"><button class="btn btn-outline-danger"><span class="job_id">2491 : Job ID 16e506f3db3c4c86b5d97f0f3cfac33b</span></button></div></a><div aria-labelledby="job_list___sub_heading_2491_1" data-parent="#job_list___sub_accordion_2491" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2491_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=58" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (58, 31), end pos: (58, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -55,7 +55,7 @@ # Constants _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" _VERSION: Final[int] = 1 - _PBKDF2_ITER: Final[int] = 120_000 + _PBKDF2_ITER: Final[int] = 120001 _SALT_LEN: Final[int] = 16 _OBJ_SAMPLE_LIMIT: Final[int] = 12 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2492"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2492_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2492_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2492_1"><button class="btn btn-outline-danger"><span class="job_id">2492 : Job ID 9a3b5d50e5db4a8ea521fd02cd37cce6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2492_1" data-parent="#job_list___sub_accordion_2492" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2492_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=58" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (58, 31), end pos: (58, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 3</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -55,7 +55,7 @@ # Constants _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" _VERSION: Final[int] = 1 - _PBKDF2_ITER: Final[int] = 120_000 + _PBKDF2_ITER: Final[int] = 119999 _SALT_LEN: Final[int] = 16 _OBJ_SAMPLE_LIMIT: Final[int] = 12 </pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.02s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2493"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2493_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2493_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2493_1"><button class="btn btn-outline-success"><span class="job_id">2493 : Job ID 90172a1fe22043e98355a4a43c960859</span></button></div></a><div aria-labelledby="job_list___sub_heading_2493_1" data-parent="#job_list___sub_accordion_2493" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2493_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (59, 28), end pos: (59, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 4</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -56,7 +56,7 @@ _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" _VERSION: Final[int] = 1 _PBKDF2_ITER: Final[int] = 120_000 - _SALT_LEN: Final[int] = 16 + _SALT_LEN: Final[int] = 17 _OBJ_SAMPLE_LIMIT: Final[int] = 12 @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181014616432Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T181015499124Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.73s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2494"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2494_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2494_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2494_1"><button class="btn btn-outline-danger"><span class="job_id">2494 : Job ID 62538c463fe04bda85a16e9c9c213200</span></button></div></a><div aria-labelledby="job_list___sub_heading_2494_1" data-parent="#job_list___sub_accordion_2494" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2494_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=59" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (59, 28), end pos: (59, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 5</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -56,7 +56,7 @@ _EMBED_NAME: Final[str] = "WM-TATOU-SIGNED-v1.json" _VERSION: Final[int] = 1 _PBKDF2_ITER: Final[int] = 120_000 - _SALT_LEN: Final[int] = 16 + _SALT_LEN: Final[int] = 15 _OBJ_SAMPLE_LIMIT: Final[int] = 12 @staticmethod</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2495"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2495_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2495_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2495_1"><button class="btn btn-outline-danger"><span class="job_id">2495 : Job ID 525695b5a80b4de59152aa31f3b22d0a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2495_1" data-parent="#job_list___sub_accordion_2495" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2495_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=60" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (60, 36), end pos: (60, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 6</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -57,7 +57,7 @@ _VERSION: Final[int] = 1 _PBKDF2_ITER: Final[int] = 120_000 _SALT_LEN: Final[int] = 16 - _OBJ_SAMPLE_LIMIT: Final[int] = 12 + _OBJ_SAMPLE_LIMIT: Final[int] = 13 @staticmethod def get_usage() -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.91s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2496"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2496_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2496_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2496_1"><button class="btn btn-outline-danger"><span class="job_id">2496 : Job ID 9d654d34a108436fb45b0b1f374eec11</span></button></div></a><div aria-labelledby="job_list___sub_heading_2496_1" data-parent="#job_list___sub_accordion_2496" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2496_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=60" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (60, 36), end pos: (60, 38)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 7</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -57,7 +57,7 @@ _VERSION: Final[int] = 1 _PBKDF2_ITER: Final[int] = 120_000 _SALT_LEN: Final[int] = 16 - _OBJ_SAMPLE_LIMIT: Final[int] = 12 + _OBJ_SAMPLE_LIMIT: Final[int] = 11 @staticmethod def get_usage() -&gt; str:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2497"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2497_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2497_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2497_1"><button class="btn btn-outline-danger"><span class="job_id">2497 : Job ID d1137c729c8c427ca03faf0bbfd47c72</span></button></div></a><div aria-labelledby="job_list___sub_heading_2497_1" data-parent="#job_list___sub_accordion_2497" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2497_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 33), end pos: (99, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 8</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count == 1: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2498"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2498_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2498_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2498_1"><button class="btn btn-outline-danger"><span class="job_id">2498 : Job ID f29b91b3c4874d7583376396f08e2a52</span></button></div></a><div aria-labelledby="job_list___sub_heading_2498_1" data-parent="#job_list___sub_accordion_2498" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2498_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=99" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (99, 33), end pos: (99, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 9</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -96,7 +96,7 @@ logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. - if doc.page_count == 0: + if doc.page_count == -1: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close()</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2499"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2499_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2499_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2499_1"><button class="btn btn-outline-danger"><span class="job_id">2499 : Job ID 29e1328ea16145059e5bae557ac3cf93</span></button></div></a><div aria-labelledby="job_list___sub_heading_2499_1" data-parent="#job_list___sub_accordion_2499" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2499_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=106" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (106, 36), end pos: (106, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 10</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -103,7 +103,7 @@ doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) - id_hint = watermark_id[:8] + id_hint = watermark_id[: 9] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.11s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2500"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2500_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2500_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2500_1"><button class="btn btn-outline-success"><span class="job_id">2500 : Job ID 5c7464cf97db49f5aa1c0bc630192af4</span></button></div></a><div aria-labelledby="job_list___sub_heading_2500_1" data-parent="#job_list___sub_accordion_2500" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2500_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=106" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (106, 36), end pos: (106, 37)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 11</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -103,7 +103,7 @@ doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) - id_hint = watermark_id[:8] + id_hint = watermark_id[: 7] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175236418522Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T175237313977Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 10 failed, 32 passed, 23 warnings in 20.56s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2501"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2501_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2501_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2501_1"><button class="btn btn-outline-danger"><span class="job_id">2501 : Job ID 8a69a865192e44fc9ef3da002fbb5b64</span></button></div></a><div aria-labelledby="job_list___sub_heading_2501_1" data-parent="#job_list___sub_accordion_2501" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2501_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (110, 40), end pos: (110, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 12</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -107,7 +107,7 @@ self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) - nonce = secrets.token_bytes(12) + nonce = secrets.token_bytes( 13) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2502"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2502_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2502_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2502_1"><button class="btn btn-outline-danger"><span class="job_id">2502 : Job ID 5c2a099c540c4444a19de9b3f93d6620</span></button></div></a><div aria-labelledby="job_list___sub_heading_2502_1" data-parent="#job_list___sub_accordion_2502" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2502_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=110" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (110, 40), end pos: (110, 42)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 13</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -107,7 +107,7 @@ self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) - nonce = secrets.token_bytes(12) + nonce = secrets.token_bytes( 11) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION,</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2503"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2503_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2503_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2503_1"><button class="btn btn-outline-danger"><span class="job_id">2503 : Job ID 572bd2915ee542c98e672caabe2f9f76</span></button></div></a><div aria-labelledby="job_list___sub_heading_2503_1" data-parent="#job_list___sub_accordion_2503" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2503_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 29), end pos: (201, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 14</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 1 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.87s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2504"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2504_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2504_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2504_1"><button class="btn btn-outline-danger"><span class="job_id">2504 : Job ID f28949759d9c457f97baeaa1d1ce4d2d</span></button></div></a><div aria-labelledby="job_list___sub_heading_2504_1" data-parent="#job_list___sub_accordion_2504" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2504_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 29), end pos: (201, 30)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 15</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= -1 or iter_count &gt; 300_000: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.23s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2505"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2505_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2505_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2505_1"><button class="btn btn-outline-danger"><span class="job_id">2505 : Job ID 82a36e8e04a742bc9aacda451606383e</span></button></div></a><div aria-labelledby="job_list___sub_heading_2505_1" data-parent="#job_list___sub_accordion_2505" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2505_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 47), end pos: (201, 54)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 16</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count &gt; 300001: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2506"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2506_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2506_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2506_1"><button class="btn btn-outline-danger"><span class="job_id">2506 : Job ID d41b049b9ab24de48a2743da62c7b075</span></button></div></a><div aria-labelledby="job_list___sub_heading_2506_1" data-parent="#job_list___sub_accordion_2506" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2506_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=201" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (201, 47), end pos: (201, 54)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 17</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -198,7 +198,7 @@ iter_count = int(manifest.get("iter", self._PBKDF2_ITER)) # Limit to 300k iterations to prevent DoS attacks # triggered by excessive PBKDF2 computation - if iter_count &lt;= 0 or iter_count &gt; 300_000: + if iter_count &lt;= 0 or iter_count &gt; 299999: raise WatermarkingError("Unreasonable PBKDF2 iteration count") key_bytes = self._derive_key(key, salt, iter_override=iter_count)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.68s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2507"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2507_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2507_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2507_1"><button class="btn btn-outline-success"><span class="job_id">2507 : Job ID b68e97b67f654742ac85f0ec3fe208b8</span></button></div></a><div aria-labelledby="job_list___sub_heading_2507_1" data-parent="#job_list___sub_accordion_2507" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2507_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (237, 19), end pos: (237, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 18</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -234,7 +234,7 @@ ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, + length= 33, salt=salt, iterations=iter_override or self._PBKDF2_ITER, )</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022FDE127890&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022FDDFABF80&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022FDDFABF80&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") &gt; ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) ^^^^^^^^^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. signed_annotation_watermark.py:120: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000022FDE127E00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022FDDFABF80&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2150/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000022FDDFABF80&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") &gt; ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) ^^^^^^^^^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. signed_annotation_watermark.py:120: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2508"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2508_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2508_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2508_1"><button class="btn btn-outline-success"><span class="job_id">2508 : Job ID dbe911d925f347d6baaee05c26db3ac3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2508_1" data-parent="#job_list___sub_accordion_2508" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2508_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=237" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (237, 19), end pos: (237, 21)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 19</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -234,7 +234,7 @@ ) -&gt; bytes: kdf = PBKDF2HMAC( algorithm=hashes.SHA256(), - length=32, + length= 31, salt=salt, iterations=iter_override or self._PBKDF2_ITER, )</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026509687890&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000265085AD340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000265085AD340&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") &gt; ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) ^^^^^^^^^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. signed_annotation_watermark.py:120: ValueError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000026509687E00&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000265085AD340&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-128/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x00000265085AD340&gt; pdf = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', key = 'unit-test-key' intended_for = 'unit-test-recipient', position = None def add_watermark( self, pdf: PdfSource, secret: str, key: str, intended_for: str | None = None, position: str | None = None, ) -&gt; bytes: if not HAS_PYMUPDF: raise WatermarkingError("PyMuPDF is required for this watermark method") if not secret or not isinstance(secret, str): raise ValueError("Secret must be a non-empty string") if not key or not isinstance(key, str): raise ValueError("Key must be a non-empty string") original = load_pdf_bytes(pdf) try: doc = pymupdf.open(stream=original, filetype="pdf") new_doc = doc.write() # normalize structure by reloading doc.close() original = load_pdf_bytes(new_doc) doc = pymupdf.open(stream=original, filetype="pdf") except Exception as exc: # fallback: create new doc and append original as raw? raise WatermarkingError(f"Failed to open PDF: {exc}") from exc logger = logging.getLogger(__name__) try: # Some minimal test PDFs may have no page tree; enforce at least one page. if doc.page_count == 0: # Create a brand new document with a blank page instead logger.debug("Rebuilding minimal PDF to include a page") doc.close() doc = pymupdf.open() doc.new_page() watermark_id = str(uuid.uuid4()) id_hint = watermark_id[:8] self._add_invisible_annotation(doc, f"WM:{id_hint}") obj_hashes = self._select_and_hash_objects(doc) salt = secrets.token_bytes(self._SALT_LEN) nonce = secrets.token_bytes(12) derived_key = self._derive_key(key, salt) plaintext = { "v": self._VERSION, "id": watermark_id, "secret": secret, "objs": [oh.__dict__ for oh in obj_hashes], "secret_len": len(secret), } pt_bytes = json.dumps(plaintext, separators=(",", ":")).encode("utf-8") &gt; ciphertext = AESGCM(derived_key).encrypt(nonce, pt_bytes, None) ^^^^^^^^^^^^^^^^^^^ E ValueError: AESGCM key must be 128, 192, or 256 bits. signed_annotation_watermark.py:120: ValueError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.12s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2509"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2509_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2509_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2509_1"><button class="btn btn-outline-danger"><span class="job_id">2509 : Job ID d4626bdba43e4e6c976f9ab2bb4c8519</span></button></div></a><div aria-labelledby="job_list___sub_heading_2509_1" data-parent="#job_list___sub_accordion_2509" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2509_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=250" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (250, 26), end pos: (250, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 20</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -247,7 +247,7 @@ xref_len = doc.xref_length() except Exception: return out - for xref in range(1, xref_len): + for xref in range( 2, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.79s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2510"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2510_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2510_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2510_1"><button class="btn btn-outline-danger"><span class="job_id">2510 : Job ID 9d4b6ea3c19f46c993a5fab58b0c613c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2510_1" data-parent="#job_list___sub_accordion_2510" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2510_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=250" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (250, 26), end pos: (250, 27)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 21</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -247,7 +247,7 @@ xref_len = doc.xref_length() except Exception: return out - for xref in range(1, xref_len): + for xref in range( 0, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.20s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2511"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2511_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2511_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2511_1"><button class="btn btn-outline-danger"><span class="job_id">2511 : Job ID 8c6e89aa40854c3f9cd1af951a259995</span></button></div></a><div aria-labelledby="job_list___sub_heading_2511_1" data-parent="#job_list___sub_accordion_2511" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2511_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 32), end pos: (264, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 22</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) &lt; 9: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2512"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2512_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2512_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2512_1"><button class="btn btn-outline-danger"><span class="job_id">2512 : Job ID 554684b2413c4e5ca4a5afda8f1065c0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2512_1" data-parent="#job_list___sub_accordion_2512" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2512_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=264" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (264, 32), end pos: (264, 33)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 23</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -261,7 +261,7 @@ if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") - if len(b.strip()) &lt; 8: + if len(b.strip()) &lt; 7: continue sha256 = self._sha256(b) out.append(_ObjectHash(xref=xref, sha256=sha256))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.15s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2513"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2513_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2513_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2513_1"><button class="btn btn-outline-danger"><span class="job_id">2513 : Job ID 5aaed3f586d94ccfb3ff5789982e9155</span></button></div></a><div aria-labelledby="job_list___sub_heading_2513_1" data-parent="#job_list___sub_accordion_2513" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2513_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 33), end pos: (273, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 24</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count == 1: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.84s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2514"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2514_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2514_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2514_1"><button class="btn btn-outline-danger"><span class="job_id">2514 : Job ID 1097d1d356fd4839b62ad41c28017e04</span></button></div></a><div aria-labelledby="job_list___sub_heading_2514_1" data-parent="#job_list___sub_accordion_2514" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2514_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=273" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (273, 33), end pos: (273, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 25</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -270,7 +270,7 @@ def _add_invisible_annotation(self, doc: pymupdf.Document, text: str) -&gt; None: logger = logging.getLogger(__name__) try: - if doc.page_count == 0: + if doc.page_count == -1: doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.83s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2515"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2515_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2515_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2515_1"><button class="btn btn-outline-danger"><span class="job_id">2515 : Job ID 3a98ecff928d4574b6fcf701d308c743</span></button></div></a><div aria-labelledby="job_list___sub_heading_2515_1" data-parent="#job_list___sub_accordion_2515" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2515_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=275" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (275, 33), end pos: (275, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 26</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -272,7 +272,7 @@ try: if doc.page_count == 0: doc.new_page() - page = doc.load_page(0) + page = doc.load_page( 1) # Place near top-left (PDF origin is bottom-left) margin = 2 tl_point = (margin, page.rect.height - margin)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.80s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2516"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2516_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2516_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2516_1"><button class="btn btn-outline-danger"><span class="job_id">2516 : Job ID 6ae756cf5f6749ec92077c46f4cdd371</span></button></div></a><div aria-labelledby="job_list___sub_heading_2516_1" data-parent="#job_list___sub_accordion_2516" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2516_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=275" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (275, 33), end pos: (275, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 27</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -272,7 +272,7 @@ try: if doc.page_count == 0: doc.new_page() - page = doc.load_page(0) + page = doc.load_page( -1) # Place near top-left (PDF origin is bottom-left) margin = 2 tl_point = (margin, page.rect.height - margin)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.92s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2517"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2517_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2517_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2517_1"><button class="btn btn-outline-danger"><span class="job_id">2517 : Job ID bfb172278df14f238872518f43c89ee3</span></button></div></a><div aria-labelledby="job_list___sub_heading_2517_1" data-parent="#job_list___sub_accordion_2517" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2517_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (277, 21), end pos: (277, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 28</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -274,7 +274,7 @@ doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) - margin = 2 + margin = 3 tl_point = (margin, page.rect.height - margin) annot = page.add_text_annot(tl_point, text) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2518"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2518_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2518_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2518_1"><button class="btn btn-outline-danger"><span class="job_id">2518 : Job ID d4da7422527c49be97d3c19c79850f17</span></button></div></a><div aria-labelledby="job_list___sub_heading_2518_1" data-parent="#job_list___sub_accordion_2518" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2518_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=277" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (277, 21), end pos: (277, 22)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 29</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -274,7 +274,7 @@ doc.new_page() page = doc.load_page(0) # Place near top-left (PDF origin is bottom-left) - margin = 2 + margin = 1 tl_point = (margin, page.rect.height - margin) annot = page.add_text_annot(tl_point, text) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.74s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2519"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2519_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2519_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2519_1"><button class="btn btn-outline-danger"><span class="job_id">2519 : Job ID 5b1868db13854895acad2e6855fa27b7</span></button></div></a><div aria-labelledby="job_list___sub_heading_2519_1" data-parent="#job_list___sub_accordion_2519" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2519_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 24), end pos: (282, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 30</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 2 | 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2520"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2520_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2520_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2520_1"><button class="btn btn-outline-danger"><span class="job_id">2520 : Job ID 886c89484de04240a8224beb45259290</span></button></div></a><div aria-labelledby="job_list___sub_heading_2520_1" data-parent="#job_list___sub_accordion_2520" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2520_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 24), end pos: (282, 25)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 31</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 0 | 2 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.82s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2521"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2521_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2521_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2521_1"><button class="btn btn-outline-danger"><span class="job_id">2521 : Job ID 87b9676cfc5d4b55a50ae40cc03f73d0</span></button></div></a><div aria-labelledby="job_list___sub_heading_2521_1" data-parent="#job_list___sub_accordion_2521" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2521_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 28), end pos: (282, 29)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 32</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 3 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.77s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2522"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2522_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2522_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2522_1"><button class="btn btn-outline-success"><span class="job_id">2522 : Job ID 854078f15ac041fcb7ecf51db82ce09c</span></button></div></a><div aria-labelledby="job_list___sub_heading_2522_1" data-parent="#job_list___sub_accordion_2522" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2522_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 28), end pos: (282, 29)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 33</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 1 | 32 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.FFF.F.F.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 401 == 200 E + where 401 = &lt;WrapperTestResponse 32 bytes [401 UNAUTHORIZED]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:272 Failed login attempt for email: user@email.se _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192725032683Z__input.pdf user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:486 Document not found or access denied for id=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:610 Document not found or access denied for id=1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 404 == 201 E + where 404 = &lt;WrapperTestResponse 31 bytes [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:972 Document not found or access denied for watermarking id=1 __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T192725926381Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 404 == 200 E + where 404 = &lt;WrapperTestResponse streamed [404 NOT FOUND]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ WARNING server:server.py:850 Document not found or access denied for deletion id=2 ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 401 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_versions_route - assert 404 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 404 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 404 == 200 8 failed, 34 passed, 23 warnings in 20.35s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2523"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2523_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2523_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2523_1"><button class="btn btn-outline-danger"><span class="job_id">2523 : Job ID a978ec296f3741c0a8f335683fa1a156</span></button></div></a><div aria-labelledby="job_list___sub_heading_2523_1" data-parent="#job_list___sub_accordion_2523" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2523_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 32), end pos: (282, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 34</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 33 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.66s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2524"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2524_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2524_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2524_1"><button class="btn btn-outline-danger"><span class="job_id">2524 : Job ID ef244b40ec55425dbca0d592986144aa</span></button></div></a><div aria-labelledby="job_list___sub_heading_2524_1" data-parent="#job_list___sub_accordion_2524" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2524_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 32), end pos: (282, 34)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 35</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 31 | 64 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.97s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2525"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2525_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2525_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2525_1"><button class="btn btn-outline-danger"><span class="job_id">2525 : Job ID 0f7cecdab59a4a2289deab7c088316ce</span></button></div></a><div aria-labelledby="job_list___sub_heading_2525_1" data-parent="#job_list___sub_accordion_2525" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2525_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 37), end pos: (282, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 36</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 | 65 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.94s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2526"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2526_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2526_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2526_1"><button class="btn btn-outline-danger"><span class="job_id">2526 : Job ID fdb74e4ae3db4f0c90323b28dc6ef597</span></button></div></a><div aria-labelledby="job_list___sub_heading_2526_1" data-parent="#job_list___sub_accordion_2526" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2526_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=282" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (282, 37), end pos: (282, 39)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 37</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -279,7 +279,7 @@ annot = page.add_text_annot(tl_point, text) try: # Flags: Invisible(1) | Hidden(2) | NoView(32) | ReadOnly(64) - flags = 1 | 2 | 32 | 64 + flags = 1 | 2 | 32 | 63 annot.set_flags(flags) except Exception as exc: logger.debug("Setting annotation flags failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2527"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2527_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2527_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2527_1"><button class="btn btn-outline-success"><span class="job_id">2527 : Job ID 5a3211d9f2c343aa9cbe77f5b8e52113</span></button></div></a><div aria-labelledby="job_list___sub_heading_2527_1" data-parent="#job_list___sub_accordion_2527" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2527_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=293" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (293, 34), end pos: (293, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 38</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -290,7 +290,7 @@ except Exception as exc: logger.debug("Setting annotation open state failed: %s", exc) try: - annot.set_opacity(0) + annot.set_opacity( 1) except Exception as exc: logger.debug("Setting annotation opacity failed: %s", exc) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.FFFFFFF.FFF.............................. [100%] ================================== FAILURES =================================== ___________________________ test_create_user_route ____________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_user_route(client): """Test user creation endpoint.""" parameters = { "login": "username", "password": "password", "email": "user@email.se", } # pragma: allowlist secret resp = client.post("/api/create-user", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 201 # Endpoint should exist ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:76: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:236 Database error in create_user: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ______________________________ test_login_route _______________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_login_route(client): """Test login endpoint.""" parameters = { "email": "user@email.se", "password": "password", } # pragma: allowlist secret resp = client.post("/api/login", json=parameters) resp_data = resp.get_json() # Note: This will likely fail due to database connectivity in tests # but we can test that the endpoint exists and handles the request #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 30 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:129: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:280 Database error in login: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) _________________________ test_upload_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_upload_document_route(client): """Test document upload endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #open dummy file with open(file_path, "rb") as f: parameters = { "file": (f, "input.pdf"), "name": "My File" } resp = client.post("/api/upload-document", data=parameters, content_type='multipart/form-data') resp_data = resp.get_json() #tests when fully functional #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:167: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180909435665Z__input.pdf user=1 __________________________ test_list_documents_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_documents_route(client): """Test document list endpoint.""" resp = client.get("/api/list-documents") resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 55 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:213: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:432 Database error in list_documents for user=1 __________________________ test_list_versions_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_versions_route(client): """Test list versions endpoint.""" parameters = {"documentid":1} resp = client.get("/api/list-versions", query_string = parameters) #resp = client.get("/api/list-versions/1") #for test without parameters resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:235: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:504 Database error in list_versions: 1,1 ________________________ test_list_all_versions_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_list_all_versions_route(client): """Test list all versions endpoint.""" #call without parameters resp = client.get("/api/list-all-versions") #Fix list all versions on API.md! resp_data = resp.get_json() #basic tests &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse 54 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:270: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:551 Database error in list_all_versions for user=1 ___________________________ test_get_document_route ___________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_document_route(client): """Test get document endpoint.""" parameters = {"documentid":1} resp = client.get("/api/get-document", query_string=parameters) #resp = client.get("/api/get-document/1") #for test without parameters # Check Content-Type is_pdf = resp.headers.get('Content-Type') == 'application/pdf' # Check Content-Disposition for 'inline' content_disposition = resp.headers.get('Content-Disposition', '') is_inline = 'inline' in content_disposition.lower() #Oracle &gt; assert is_pdf E assert False ..\test\test_api.py:297: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:600 Database error in get_document: 1,1 _________________________ test_create_watermark_route _________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_create_watermark_route(client): """Test create watermark endpoint.""" parameters = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse", "id": 1} parameters_no_id = {"method": "robust-xmp", "position": "metadata-only", "key": "key", "secret": "secret", "intended_for":"Mickey Mouse"} resp = client.post("/api/create-watermark", json=parameters) #resp = client.post("/apicreate-watermark/1", json=parameters_no_id) data = resp.get_json() #basic tests &gt; assert resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 27 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:337: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:968 Database error fetching document (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) __________________________ test_read_watermark_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_read_watermark_route(client): """Test read watermark endpoint.""" file_path = script_dir / "storage" / "files" / "username" / "input.pdf" #Upload watermarked file to the app with open(file_path, "rb") as f: data = { "file": (f, "watermarked.pdf"), "name": "Water File" } upload_resp = client.post("/api/upload-document", data=data, content_type='multipart/form-data') upload_resp_data = upload_resp.get_json() &gt; assert upload_resp.status_code == 201 E assert 503 == 201 E + where 503 = &lt;WrapperTestResponse 36 bytes [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:404: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:393 Database error inserting document path=C:\Users\franc\Documents\GitHub\softsec-tatou\server\src\storage\files\username\20251017T180910341307Z__watermarked.pdf user=1 _________________________ test_delete_document_route __________________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_delete_document_route(client): document_id = {"id": 2} resp = client.delete("/api/delete-document", json=document_id) #resp = client.delete("/api/delete-document/2") &gt; assert resp.status_code == 200 E assert 503 == 200 E + where 503 = &lt;WrapperTestResponse streamed [503 SERVICE UNAVAILABLE]&gt;.status_code ..\test\test_api.py:457: AssertionError ------------------------------ Captured log call ------------------------------ ERROR server:server.py:844 DB delete error for doc id=2: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_create_user_route - assert 503 == 201 FAILED ..\test\test_api.py::test_login_route - assert 503 == 200 FAILED ..\test\test_api.py::test_upload_document_route - assert 503 == 201 FAILED ..\test\test_api.py::test_list_documents_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_list_all_versions_route - assert 503 == 200 FAILED ..\test\test_api.py::test_get_document_route - assert False FAILED ..\test\test_api.py::test_create_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_read_watermark_route - assert 503 == 201 FAILED ..\test\test_api.py::test_delete_document_route - assert 503 == 200 10 failed, 32 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2528"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2528_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2528_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2528_1"><button class="btn btn-outline-danger"><span class="job_id">2528 : Job ID 28774c5687a94f2daf0866ffdc20afcb</span></button></div></a><div aria-labelledby="job_list___sub_heading_2528_1" data-parent="#job_list___sub_accordion_2528" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2528_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=293" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (293, 34), end pos: (293, 35)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 39</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -290,7 +290,7 @@ except Exception as exc: logger.debug("Setting annotation open state failed: %s", exc) try: - annot.set_opacity(0) + annot.set_opacity( -1) except Exception as exc: logger.debug("Setting annotation opacity failed: %s", exc) try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.86s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2529"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2529_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2529_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2529_1"><button class="btn btn-outline-danger"><span class="job_id">2529 : Job ID eaec6c677e9f4633a29ef8946c1e54a6</span></button></div></a><div aria-labelledby="job_list___sub_heading_2529_1" data-parent="#job_list___sub_accordion_2529" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2529_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 49), end pos: (299, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 40</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 3, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.99s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2530"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2530_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2530_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2530_1"><button class="btn btn-outline-danger"><span class="job_id">2530 : Job ID 25b476b324a640fe937a4144667faf22</span></button></div></a><div aria-labelledby="job_list___sub_heading_2530_1" data-parent="#job_list___sub_accordion_2530" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2530_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 49), end pos: (299, 50)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 41</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 1, r.x0 + 2, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2531"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2531_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2531_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2531_1"><button class="btn btn-outline-danger"><span class="job_id">2531 : Job ID c9d430dadccd47699d9a1b115d7f32ed</span></button></div></a><div aria-labelledby="job_list___sub_heading_2531_1" data-parent="#job_list___sub_accordion_2531" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2531_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 59), end pos: (299, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 42</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 3, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.07s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2532"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2532_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2532_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2532_1"><button class="btn btn-outline-danger"><span class="job_id">2532 : Job ID a2448db143a44995958eabf85a45b39a</span></button></div></a><div aria-labelledby="job_list___sub_heading_2532_1" data-parent="#job_list___sub_accordion_2532" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2532_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=299" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (299, 59), end pos: (299, 60)</button></a></pre><pre>operator: core/NumberReplacer, occurrence: 43</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -296,7 +296,7 @@ try: # Shrink rectangle to a tiny box r = annot.rect - tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 2, r.y1) + tiny = pymupdf.Rect(r.x0, r.y1 - 2, r.x0 + 1, r.y1) annot.set_rect(tiny) except Exception as exc: logger.debug("Shrinking annotation rect failed: %s", exc)</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 21.00s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2533"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2533_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2533_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2533_1"><button class="btn btn-outline-success"><span class="job_id">2533 : Job ID 71a3acba71e9443bb4d993d75095f506</span></button></div></a><div aria-labelledby="job_list___sub_heading_2533_1" data-parent="#job_list___sub_accordion_2533" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2533_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=44" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (44, 0), end pos: (45, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -39,9 +39,6 @@ HAS_PYMUPDF = True except Exception: HAS_PYMUPDF = False - - -@dataclass class _ObjectHash: xref: int sha256: str</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019F620139E0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019F61F4F320&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:105: in add_watermark obj_hashes = self._select_and_hash_objects(doc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019F61F4F320&gt; doc = closed Document('None', &lt;memory, doc# 15&gt;) def _select_and_hash_objects(self, doc: pymupdf.Document) -&gt; list[_ObjectHash]: """Return hashes of a subset of objects after annotation insertion.""" out: list[_ObjectHash] = [] try: xref_len = doc.xref_length() except Exception: return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc ) continue lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: continue sha256 = self._sha256(b) &gt; out.append(_ObjectHash(xref=xref, sha256=sha256)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: _ObjectHash() takes no arguments signed_annotation_watermark.py:264: TypeError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x0000019F62013F50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019F61F4F320&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2421/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:105: in add_watermark obj_hashes = self._select_and_hash_objects(doc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x0000019F61F4F320&gt; doc = closed Document('None', &lt;memory, doc# 22&gt;) def _select_and_hash_objects(self, doc: pymupdf.Document) -&gt; list[_ObjectHash]: """Return hashes of a subset of objects after annotation insertion.""" out: list[_ObjectHash] = [] try: xref_len = doc.xref_length() except Exception: return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc ) continue lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: continue sha256 = self._sha256(b) &gt; out.append(_ObjectHash(xref=xref, sha256=sha256)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: _ObjectHash() takes no arguments signed_annotation_watermark.py:264: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.41s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2534"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2534_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2534_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2534_1"><button class="btn btn-outline-success"><span class="job_id">2534 : Job ID 449f4b37c6e0498aa84f52eda0fcc734</span></button></div></a><div aria-labelledby="job_list___sub_heading_2534_1" data-parent="#job_list___sub_accordion_2534" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2534_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=62" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (62, 4), end pos: (63, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -58,8 +58,6 @@ _PBKDF2_ITER: Final[int] = 120_000 _SALT_LEN: Final[int] = 16 _OBJ_SAMPLE_LIMIT: Final[int] = 12 - - @staticmethod def get_usage() -&gt; str: return ( "TamperÔÇæresistant watermark using encrypted embedded file"</pre></div><div class="alert alert-secondary"><pre class="diff">........F................................F [100%] ================================== FAILURES =================================== _____________________ test_get_watermarking_methods_route _____________________ client = &lt;FlaskClient &lt;Flask 'server'&gt;&gt; def test_get_watermarking_methods_route(client): """Test get watermarking methods endpoint.""" &gt; resp = client.get("/api/get-watermarking-methods") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ..\test\test_api.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1162: in get return self.open(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\testing.py:235: in open response = super().open( C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1536: in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1514: in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:1511: in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:919: in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:917: in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py:902: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @app.get("/api/get-watermarking-methods") def get_watermarking_methods(): methods = [] for m in WMUtils.METHODS: methods.append( &gt; {"name": m, "description": WMUtils.get_method(m).get_usage()} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E TypeError: SignedAnnotationWatermark.get_usage() takes 0 positional arguments but 1 was given server.py:1137: TypeError _________ TestWatermarkingUtils.test_method_get_usage_returns_string __________ self = &lt;test_watermarking_utilities.TestWatermarkingUtils object at 0x000001E2CDD1E360&gt; def test_method_get_usage_returns_string(self): """Test that all methods return string from get_usage.""" for _name, method in WMUtils.METHODS.items(): &gt; usage = method.get_usage() ^^^^^^^^^^^^^^^^^^ E TypeError: SignedAnnotationWatermark.get_usage() takes 0 positional arguments but 1 was given ..\test\test_watermarking_utilities.py:258: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_api.py::test_get_watermarking_methods_route - TypeError: ... FAILED ..\test\test_watermarking_utilities.py::TestWatermarkingUtils::test_method_get_usage_returns_string 2 failed, 40 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2535"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2535_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2535_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-success" id="job_list___sub_heading_2535_1"><button class="btn btn-outline-success"><span class="job_id">2535 : Job ID 28c7760e174a404490c6980525bd75be</span></button></div></a><div aria-labelledby="job_list___sub_heading_2535_1" data-parent="#job_list___sub_accordion_2535" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2535_1"><div class="card-body"><div class="work-item"><div class="alert alert-success test-outcome" role="alert"><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.KILLED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=348" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (348, 4), end pos: (349, 0)</button></a></pre><pre>operator: core/RemoveDecorator, occurrence: 2</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -344,8 +344,6 @@ raise WatermarkingError( f"PDF appears tampered: object hash mismatch (xref {xref})" ) - - @staticmethod def _sha256(b: bytes) -&gt; str: h = hashes.Hash(hashes.SHA256()) h.update(b)</pre></div><div class="alert alert-secondary"><pre class="diff">....................F..F.................. [100%] ================================== FAILURES =================================== ___ TestAllWatermarkingMethods.test_add_watermark_and_shape[signed-annots] ____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C70F92B6E0&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C70F863230&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' def test_add_watermark_and_shape( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") original = sample_pdf_path.read_bytes() &gt; out_bytes = wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ..\test\test_watermarking_all_methods.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:108: in add_watermark obj_hashes = self._select_and_hash_objects(doc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C70F863230&gt; doc = closed Document('None', &lt;memory, doc# 15&gt;) def _select_and_hash_objects(self, doc: pymupdf.Document) -&gt; list[_ObjectHash]: """Return hashes of a subset of objects after annotation insertion.""" out: list[_ObjectHash] = [] try: xref_len = doc.xref_length() except Exception: return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc ) continue lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: continue &gt; sha256 = self._sha256(b) ^^^^^^^^^^^^^^^ E TypeError: SignedAnnotationWatermark._sha256() takes 1 positional argument but 2 were given signed_annotation_watermark.py:266: TypeError ____ TestAllWatermarkingMethods.test_read_secret_roundtrip[signed-annots] _____ self = &lt;test_watermarking_all_methods.TestAllWatermarkingMethods object at 0x000001C70F92BC50&gt; method_name = 'signed-annots' impl = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C70F863230&gt; sample_pdf_path = WindowsPath('C:/Users/franc/Documents/GitHub/softsec-tatou/server/test/storage/files/username/input.pdf') secret = 'unit-test-secret', intended_for = 'unit-test-recipient' key = 'unit-test-key' tmp_path = WindowsPath('C:/Users/franc/AppData/Local/Temp/pytest-of-franc/pytest-2260/test_read_secret_roundtrip_sig0') def test_read_secret_roundtrip( self, method_name: str, impl: WatermarkingMethod, sample_pdf_path: Path, secret: str, intended_for: str, key: str, tmp_path: Path, ): wm_impl = _as_instance(impl) if not wm_impl.is_watermark_applicable(sample_pdf_path, position=None): pytest.skip(f"{method_name}: not applicable to the sample PDF") out_pdf = tmp_path / f"{method_name}_watermarked.pdf" out_pdf.write_bytes( &gt; wm_impl.add_watermark( sample_pdf_path, secret=secret, key=key, intended_for=intended_for, position=None, ) ) ..\test\test_watermarking_all_methods.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signed_annotation_watermark.py:108: in add_watermark obj_hashes = self._select_and_hash_objects(doc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;signed_annotation_watermark.SignedAnnotationWatermark object at 0x000001C70F863230&gt; doc = closed Document('None', &lt;memory, doc# 22&gt;) def _select_and_hash_objects(self, doc: pymupdf.Document) -&gt; list[_ObjectHash]: """Return hashes of a subset of objects after annotation insertion.""" out: list[_ObjectHash] = [] try: xref_len = doc.xref_length() except Exception: return out for xref in range(1, xref_len): if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try: obj_str = doc.xref_object(xref, compressed=False) or "" except Exception as exc: logging.getLogger(__name__).debug( "Reading xref %s failed: %s", xref, exc ) continue lower = obj_str.lower() if "/type /catalog" in lower or "/names" in lower: continue b = obj_str.encode("latin-1", "replace") if len(b.strip()) &lt; 8: continue &gt; sha256 = self._sha256(b) ^^^^^^^^^^^^^^^ E TypeError: SignedAnnotationWatermark._sha256() takes 1 positional argument but 2 were given signed_annotation_watermark.py:266: TypeError ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_add_watermark_and_shape[signed-annots] FAILED ..\test\test_watermarking_all_methods.py::TestAllWatermarkingMethods::test_read_secret_roundtrip[signed-annots] 2 failed, 40 passed, 23 warnings in 21.08s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2536"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2536_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2536_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2536_1"><button class="btn btn-outline-danger"><span class="job_id">2536 : Job ID 53ed837288c543619565c9bf9c8d8e6f</span></button></div></a><div aria-labelledby="job_list___sub_heading_2536_1" data-parent="#job_list___sub_accordion_2536" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2536_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=250" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (250, 20), end pos: (250, 38)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 0</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -247,7 +247,7 @@ xref_len = doc.xref_length() except Exception: return out - for xref in range(1, xref_len): + for xref in []: if len(out) &gt;= self._OBJ_SAMPLE_LIMIT: break try:</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.93s </pre></div></div></div></div></div><div class="mb-1" id="job_list___sub_accordion_2537"><div class="card"><a data-toggle="collapse" data-target="#job_list___sub_collapse_2537_1" aria-expanded="false" aria-controls="job_list___sub_collapse_2537_1" href="#" class="job_list___sub_multi_heading"><div role="alert" class="card-header alert-danger" id="job_list___sub_heading_2537_1"><button class="btn btn-outline-danger"><span class="job_id">2537 : Job ID a4855693f40f4b5fa304b9ed5310bbca</span></button></div></a><div aria-labelledby="job_list___sub_heading_2537_1" data-parent="#job_list___sub_accordion_2537" class="collapse job_list___sub_multi_collapse" id="job_list___sub_collapse_2537_1"><div class="card-body"><div class="work-item"><div class="alert alert-danger test-outcome" role="alert"><p>SURVIVED</p><p>worker outcome: WorkerOutcome.NORMAL</p><p>test outcome: TestOutcome.SURVIVED</p></div></div><pre class="location"><a href="pycharm://open?file=signed_annotation_watermark.py&amp;line=326" class="text-secondary"><button class="btn btn-outline-dark">signed_annotation_watermark.py, start pos: (326, 17), end pos: (326, 24)</button></a></pre><pre>operator: core/ZeroIterationForLoop, occurrence: 1</pre><div class="alert alert-secondary"><pre class="diff">--- mutation diff --- --- asigned_annotation_watermark.py +++ bsigned_annotation_watermark.py @@ -323,7 +323,7 @@ return None def _verify_object_hashes(self, doc: pymupdf.Document, entries: list[Any]) -&gt; None: - for e in entries: + for e in []: try: xref = int(e.get("xref")) expected = str(e.get("sha256"))</pre></div><div class="alert alert-secondary"><pre class="diff">.......................................... [100%] ============================== warnings summary =============================== ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 import imghdr &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute &lt;frozen importlib._bootstrap&gt;:488 &lt;frozen importlib._bootstrap&gt;:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21 C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead. warnings.warn( ..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: 1 warning test/test_api.py: 15 warnings C:\Users\franc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pgpy\constants.py:193: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 42 passed, 23 warnings in 20.90s </pre></div></div></div></div></div></div></div></div></div></div><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script><script type="text/javascript">$('div.job_list___sub_multi_collapse').on('shown.bs.collapse', function () { correct_behavior_functional_buttons(); });$('div.job_list___sub_multi_collapse').on('hidden.bs.collapse', function () { correct_behavior_functional_buttons(); });function correct_behavior_functional_buttons() { var expand = false; var collapse = false; $('a.job_list___sub_multi_heading').each(function(index) { if ($(this).attr('aria-expanded') == 'false') { expand = true; return false; }; }); $('a.job_list___sub_multi_heading').each(function(index) { if ($(this).attr('aria-expanded') == 'true') { collapse = true; return false; }; }); if (expand) { $('div#job_item_expand_all').css('display', 'inline-block'); } else { $('div#job_item_expand_all').css('display', 'none'); }; if (collapse) { $('div#job_item_collapse_all').css('display', 'inline-block'); } else { $('div#job_item_collapse_all').css('display', 'none'); }; };correct_behavior_functional_buttons();</script></body></html>